home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / shells / rc-1.000 / rc-1
Tape Archive  |  1994-07-28  |  910.0 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: Tape Archive (archive/tar).

You can browse this item here: rc-1

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert Tape Archive (archive/tar) magic Supported
100% file POSIX tar archive (GNU) default
99% file POSIX tar archive (GNU), directory rc-1.5-linux/, mode 40700 , uid 625 , gid 1 , size 0 , seconds 5616024626, user cb, group other default
98% file data default
62% TrID TAR - Tape ARchive (GNU) default
37% TrID TAR - Tape ARchive (directory) default
100% siegfried x-fmt/265 Tape Archive Format default
100% lsar Tar default
100% gt2 TAR Archiv gefunden (Auflistung ist deaktiviert) default
100% disktype GNU tar archive default
100% detectItEasy Archive: tar default
100% binwalkID POSIX tar archive (GNU), owner user name: "inux/" default
100% xdgMime application/x-tar default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 72 63 2d 31 2e 35 2d 6c | 69 6e 75 78 2f 00 00 00 |rc-1.5-l|inux/...|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000050| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000060| 00 00 00 00 20 34 30 37 | 30 30 20 00 20 20 20 36 |.... 407|00 . 6|
|00000070| 32 35 20 00 20 20 20 20 | 20 31 20 00 20 20 20 20 |25 . | 1 . |
|00000080| 20 20 20 20 20 20 30 20 | 20 35 36 31 36 30 32 34 | 0 | 5616024|
|00000090| 36 32 36 20 20 31 30 37 | 31 34 00 20 35 00 00 00 |626 107|14. 5...|
|000000a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000100| 00 75 73 74 61 72 20 20 | 00 63 62 00 00 00 00 00 |.ustar |.cb.....|
|00000110| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000120| 00 00 00 00 00 00 00 00 | 00 6f 74 68 65 72 00 00 |........|.other..|
|00000130| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000140| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000150| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000160| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000170| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000180| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000190| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000200| 72 63 2d 31 2e 35 2d 6c | 69 6e 75 78 2f 4c 49 4e |rc-1.5-l|inux/LIN|
|00000210| 55 58 5f 4e 4f 54 45 53 | 00 00 00 00 00 00 00 00 |UX_NOTES|........|
|00000220| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000230| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000240| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000250| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000260| 00 00 00 00 31 30 30 36 | 30 30 20 00 20 20 20 36 |....1006|00 . 6|
|00000270| 32 35 20 00 20 20 20 20 | 20 31 20 00 20 20 20 20 |25 . | 1 . |
|00000280| 20 20 33 33 36 37 36 20 | 20 35 36 31 36 30 31 37 | 33676 | 5616017|
|00000290| 37 34 34 20 20 31 32 36 | 34 37 00 20 30 00 00 00 |744 126|47. 0...|
|000002a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000300| 00 75 73 74 61 72 20 20 | 00 63 62 00 00 00 00 00 |.ustar |.cb.....|
|00000310| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000320| 00 00 00 00 00 00 00 00 | 00 6f 74 68 65 72 00 00 |........|.other..|
|00000330| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000340| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000350| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000360| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000370| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000380| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000390| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000400| 43 6f 6d 70 69 6c 61 74 | 69 6f 6e 20 6f 66 20 72 |Compilat|ion of r|
|00000410| 63 20 6f 6e 20 4c 69 6e | 75 78 20 28 6b 65 72 6e |c on Lin|ux (kern|
|00000420| 65 6c 20 76 65 72 73 69 | 6f 6e 20 31 2e 30 2b 2c |el versi|on 1.0+,|
|00000430| 20 6c 69 62 63 2d 34 2e | 35 2e 32 31 2b 2c 20 67 | libc-4.|5.21+, g|
|00000440| 63 63 2d 32 2e 35 2e 38 | 2b 29 0a 2d 2d 2d 2d 2d |cc-2.5.8|+).-----|
|00000450| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000460| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000470| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000480| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000490| 2d 2d 2d 2d 2d 0a 0a 43 | 48 41 4e 47 45 53 20 46 |-----..C|HANGES F|
|000004a0| 52 4f 4d 20 54 48 45 20 | 53 54 4f 43 4b 20 52 43 |ROM THE |STOCK RC|
|000004b0| 2d 31 2e 35 20 44 49 53 | 54 52 49 42 55 54 49 4f |-1.5 DIS|TRIBUTIO|
|000004c0| 4e 20 28 41 54 20 76 69 | 7a 2e 74 61 6d 75 2e 65 |N (AT vi|z.tamu.e|
|000004d0| 64 75 3a 2f 70 75 62 2f | 72 63 29 0a 0a 28 4e 4f |du:/pub/|rc)..(NO|
|000004e0| 54 45 21 20 73 79 6e 74 | 61 63 74 69 63 61 6c 20 |TE! synt|actical |
|000004f0| 63 68 61 6e 67 65 73 20 | 61 72 65 20 69 6e 20 6e |changes |are in n|
|00000500| 6f 20 77 61 79 20 63 6f | 6e 64 6f 6e 65 64 20 62 |o way co|ndoned b|
|00000510| 79 20 74 68 65 20 61 75 | 74 68 6f 72 20 42 79 72 |y the au|thor Byr|
|00000520| 6f 6e 20 52 61 6b 69 74 | 7a 69 73 2c 0a 20 20 20 |on Rakit|zis,. |
|00000530| 20 20 20 20 68 65 20 77 | 61 73 6e 27 74 20 65 76 | he w|asn't ev|
|00000540| 65 6e 20 63 6f 6e 74 61 | 63 74 65 64 2e 20 20 44 |en conta|cted. D|
|00000550| 4f 4e 27 54 20 42 55 47 | 20 68 69 6d 20 61 62 6f |ON'T BUG| him abo|
|00000560| 75 74 20 74 68 65 6d 2e | 20 20 54 68 65 72 65 20 |ut them.| There |
|00000570| 73 74 69 6c 6c 20 65 78 | 69 74 73 0a 20 20 20 20 |still ex|its. |
|00000580| 20 20 20 61 6e 20 72 63 | 20 6d 61 69 6c 69 6e 67 | an rc| mailing|
|00000590| 20 6c 69 73 74 20 66 6f | 72 20 64 69 73 63 75 73 | list fo|r discus|
|000005a0| 73 69 6f 6e 20 6f 66 20 | 74 68 69 73 20 6b 69 6e |sion of |this kin|
|000005b0| 64 20 6f 66 20 73 74 75 | 66 66 2e 20 20 52 45 41 |d of stu|ff. REA|
|000005c0| 44 20 54 48 45 20 46 41 | 51 21 29 0a 0a 20 20 20 |D THE FA|Q!).. |
|000005d0| 20 30 29 20 20 4c 49 54 | 54 4c 45 20 54 48 49 4e | 0) LIT|TLE THIN|
|000005e0| 47 53 3a 0a 0a 2d 2d 2d | 2d 3e 20 20 20 64 65 66 |GS:..---|-> def|
|000005f0| 69 6e 65 64 20 74 68 65 | 20 2f 64 65 76 2f 66 64 |ined the| /dev/fd|
|00000600| 20 69 6e 20 63 6f 6e 66 | 69 67 2e 68 0a 2d 2d 2d | in conf|ig.h.---|
|00000610| 2d 3e 20 20 20 4c 69 6e | 75 78 20 68 61 73 20 2f |-> Lin|ux has /|
|00000620| 70 72 6f 63 2c 20 6d 61 | 6b 65 20 61 20 73 79 6d |proc, ma|ke a sym|
|00000630| 62 6f 6c 69 63 20 6c 69 | 6e 6b 3a 20 6c 6e 20 2d |bolic li|nk: ln -|
|00000640| 73 20 2f 70 72 6f 63 2f | 73 65 6c 66 2f 66 64 20 |s /proc/|self/fd |
|00000650| 2f 64 65 76 2f 66 64 0a | 2d 2d 2d 2d 3e 20 20 20 |/dev/fd.|----> |
|00000660| 6d 61 64 65 20 73 75 72 | 65 20 52 45 41 44 4c 49 |made sur|e READLI|
|00000670| 4e 45 20 77 61 73 20 75 | 6e 64 65 66 69 6e 65 64 |NE was u|ndefined|
|00000680| 2c 20 73 65 65 20 6c 69 | 6e 65 20 65 64 69 74 69 |, see li|ne editi|
|00000690| 6e 67 20 73 65 63 74 69 | 6f 6e 20 62 65 6c 6f 77 |ng secti|on below|
|000006a0| 0a 2d 2d 2d 2d 3e 20 20 | 20 41 6c 73 6f 20 63 68 |.----> | Also ch|
|000006b0| 61 6e 67 65 64 20 73 6f | 6d 65 20 6f 70 74 69 6d |anged so|me optim|
|000006c0| 69 7a 61 74 69 6f 6e 20 | 66 6c 61 67 73 2e 0a 0a |ization |flags...|
|000006d0| 20 20 20 20 31 29 20 20 | 73 69 67 6d 73 67 73 2e | 1) |sigmsgs.|
|000006e0| 5b 63 68 5d 0a 0a 20 20 | 20 20 20 20 20 20 41 20 |[ch].. | A |
|000006f0| 22 6e 6f 6e 2d 73 74 61 | 6e 64 61 72 64 22 20 73 |"non-sta|ndard" s|
|00000700| 69 67 6e 61 6c 2e 68 20 | 66 69 6c 65 20 63 61 75 |ignal.h |file cau|
|00000710| 73 65 73 20 27 6d 6b 73 | 69 67 6e 61 6c 27 20 74 |ses 'mks|ignal' t|
|00000720| 6f 20 63 6f 6d 70 6c 65 | 74 65 6c 79 20 66 61 69 |o comple|tely fai|
|00000730| 6c 2e 0a 20 20 20 20 20 | 20 20 20 54 6f 20 66 69 |l.. | To fi|
|00000740| 78 20 69 74 20 77 65 20 | 75 73 65 20 74 68 65 20 |x it we |use the |
|00000750| 73 69 67 6e 61 6c 28 37 | 29 20 6d 61 6e 20 70 61 |signal(7|) man pa|
|00000760| 67 65 20 74 6f 20 66 69 | 6e 64 20 74 68 65 20 32 |ge to fi|nd the 2|
|00000770| 39 20 73 69 67 6e 61 6c | 73 20 61 6e 64 0a 20 20 |9 signal|s and. |
|00000780| 20 20 20 20 20 20 74 68 | 65 69 72 20 64 65 73 63 | th|eir desc|
|00000790| 72 69 70 74 69 6f 6e 73 | 2e 20 20 53 65 65 20 6d |riptions|. See m|
|000007a0| 79 20 76 65 72 73 69 6f | 6e 73 20 6f 66 20 73 69 |y versio|ns of si|
|000007b0| 67 6d 73 67 73 2e 5b 63 | 68 5d 20 61 74 20 74 68 |gmsgs.[c|h] at th|
|000007c0| 65 20 62 6f 74 74 6f 6d | 0a 20 20 20 20 20 20 20 |e bottom|. |
|000007d0| 20 6f 66 20 74 68 69 73 | 20 66 69 6c 65 2e 20 20 | of this| file. |
|000007e0| 49 20 68 61 76 65 20 6c | 65 66 74 20 74 68 65 6d |I have l|eft them|
|000007f0| 20 69 6e 20 74 68 65 20 | 64 69 72 65 63 74 6f 72 | in the |director|
|00000800| 79 20 61 6e 64 20 6d 6f | 64 69 66 69 65 64 20 27 |y and mo|dified '|
|00000810| 6d 61 6b 65 0a 20 20 20 | 20 20 20 20 20 63 6c 65 |make. | cle|
|00000820| 61 6e 27 20 74 6f 20 6e | 6f 74 20 74 72 61 73 68 |an' to n|ot trash|
|00000830| 20 74 68 65 6d 2e 0a 0a | 20 20 20 20 32 29 20 20 | them...| 2) |
|00000840| 72 65 64 75 6e 64 61 6e | 74 20 64 65 63 6c 61 72 |redundan|t declar|
|00000850| 61 74 69 6f 6e 20 72 65 | 6d 6f 76 61 6c 0a 20 20 |ation re|moval. |
|00000860| 20 20 20 20 20 20 0a 20 | 20 20 20 20 20 20 20 54 | . | T|
|00000870| 6f 20 67 65 74 20 72 63 | 20 74 6f 20 63 6f 6d 70 |o get rc| to comp|
|00000880| 69 6c 65 20 49 20 68 61 | 64 20 74 6f 20 63 6f 6d |ile I ha|d to com|
|00000890| 6d 65 6e 74 20 6f 75 74 | 20 74 68 65 20 28 72 65 |ment out| the (re|
|000008a0| 64 75 6e 64 61 6e 74 29 | 20 64 65 63 6c 61 72 61 |dundant)| declara|
|000008b0| 74 69 6f 6e 0a 20 20 20 | 20 20 20 20 20 6f 66 20 |tion. | of |
|000008c0| 27 6c 6f 6e 67 6a 6d 70 | 27 20 69 6e 20 6a 62 77 |'longjmp|' in jbw|
|000008d0| 72 61 70 2e 68 20 61 6e | 64 20 63 6f 6d 70 69 6c |rap.h an|d compil|
|000008e0| 65 20 77 69 74 68 20 53 | 59 53 56 52 34 20 64 65 |e with S|YSVR4 de|
|000008f0| 66 69 6e 65 64 2e 0a 0a | 20 20 20 20 33 29 20 20 |fined...| 3) |
|00000900| 74 72 69 70 2e 72 63 20 | 6e 6f 74 65 73 0a 0a 20 |trip.rc |notes.. |
|00000910| 20 20 20 20 20 20 20 72 | 63 20 73 6f 20 6f 62 74 | r|c so obt|
|00000920| 61 69 6e 65 64 20 70 61 | 73 73 65 73 20 61 6c 6c |ained pa|sses all|
|00000930| 20 27 74 72 69 70 2e 72 | 63 27 20 74 65 73 74 73 | 'trip.r|c' tests|
|00000940| 20 77 69 74 68 20 74 68 | 65 20 66 6f 6c 6c 6f 77 | with th|e follow|
|00000950| 69 6e 67 20 65 78 63 65 | 70 74 69 6f 6e 73 3a 0a |ing exce|ptions:.|
|00000960| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 27 2e 20 |. | '. |
|00000970| 2d 69 27 20 64 6f 65 73 | 6e 27 74 20 70 72 69 6e |-i' does|n't prin|
|00000980| 74 20 6f 75 74 20 70 72 | 6f 6d 70 74 73 2e 20 28 |t out pr|ompts. (|
|00000990| 6e 6f 74 20 62 69 67 20 | 64 65 61 6c 20 66 75 6e |not big |deal fun|
|000009a0| 63 74 69 6f 6e 61 6c 6c | 79 29 0a 0a 20 20 20 20 |ctionall|y).. |
|000009b0| 20 20 20 20 20 20 20 20 | 70 72 6f 74 65 63 74 5f | |protect_|
|000009c0| 65 6e 76 20 74 72 69 70 | 20 66 61 69 6c 73 2c 20 |env trip| fails, |
|000009d0| 62 75 74 20 6c 6f 6f 6b | 69 6e 67 20 61 74 20 61 |but look|ing at a|
|000009e0| 20 27 2d 78 27 20 74 72 | 61 63 65 20 6f 66 20 77 | '-x' tr|ace of w|
|000009f0| 68 61 74 27 73 20 67 6f | 69 6e 67 0a 20 20 20 20 |hat's go|ing. |
|00000a00| 20 20 20 20 20 20 20 20 | 20 20 20 20 6f 6e 20 73 | | on s|
|00000a10| 65 65 6d 73 20 74 6f 20 | 76 61 6c 69 64 61 74 65 |eems to |validate|
|00000a20| 20 74 68 65 20 62 65 68 | 61 76 69 6f 72 2e 20 20 | the beh|avior. |
|00000a30| 54 68 65 20 63 6f 6d 6d | 61 6e 64 20 73 75 62 73 |The comm|and subs|
|00000a40| 74 69 74 75 74 69 6f 6e | 0a 20 20 20 20 20 20 20 |titution|. |
|00000a50| 20 20 20 20 20 20 20 20 | 20 73 68 6f 75 6c 64 20 | | should |
|00000a60| 6f 62 76 69 6f 75 73 6c | 79 20 72 65 74 75 72 6e |obviousl|y return|
|00000a70| 20 28 29 2c 20 77 68 69 | 63 68 20 69 74 20 64 6f | (), whi|ch it do|
|00000a80| 65 73 2e 20 20 21 20 7e | 20 28 29 20 27 2e 2e 27 |es. ! ~| () '..'|
|00000a90| 20 2d 3e 20 74 72 75 65 | 0a 20 20 20 20 20 20 20 | -> true|. |
|00000aa0| 20 20 20 20 20 20 20 20 | 20 73 6f 20 69 74 20 66 | | so it f|
|00000ab0| 61 69 6c 73 2e 20 20 20 | 49 20 64 6f 6e 27 74 20 |ails. |I don't |
|00000ac0| 74 68 69 6e 67 20 74 68 | 61 74 20 74 68 65 20 27 |thing th|at the '|
|00000ad0| 21 27 20 73 68 6f 75 6c | 64 20 62 65 20 74 68 65 |!' shoul|d be the|
|00000ae0| 72 65 2e 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |re.. | |
|00000af0| 20 20 20 20 42 75 74 20 | 65 76 65 6e 20 69 66 20 | But |even if |
|00000b00| 69 74 20 77 65 72 65 2c | 20 73 69 6e 63 65 20 74 |it were,| since t|
|00000b10| 68 65 20 66 75 6e 63 74 | 69 6f 6e 20 73 65 61 72 |he funct|ion sear|
|00000b20| 63 68 65 64 20 66 6f 72 | 20 69 73 20 6e 65 76 65 |ched for| is neve|
|00000b30| 72 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |r. | |
|00000b40| 20 20 64 65 66 69 6e 65 | 64 2c 20 77 68 79 20 77 | define|d, why w|
|00000b50| 6f 75 6c 64 20 69 74 20 | 65 76 65 72 20 62 65 20 |ould it |ever be |
|00000b60| 74 68 65 72 65 3f 20 20 | 54 68 69 73 20 27 74 72 |there? |This 'tr|
|00000b70| 69 70 27 20 73 65 65 6d | 73 20 62 72 6f 6b 65 6e |ip' seem|s broken|
|00000b80| 2e 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |.. | |
|00000b90| 20 20 42 79 20 74 68 65 | 20 77 61 79 2c 20 49 27 | By the| way, I'|
|00000ba0| 76 65 20 74 65 73 74 65 | 64 20 69 74 20 6f 74 68 |ve teste|d it oth|
|00000bb0| 65 72 20 77 61 79 73 20 | 61 6e 64 20 27 72 63 20 |er ways |and 'rc |
|00000bc0| 2d 70 27 20 72 65 61 6c | 6c 79 20 64 6f 65 73 0a |-p' real|ly does.|
|00000bd0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000be0| 27 70 72 6f 74 65 63 74 | 27 20 79 6f 75 72 20 65 |'protect|' your e|
|00000bf0| 6e 76 69 72 6f 6e 6d 65 | 6e 74 20 66 72 6f 6d 20 |nvironme|nt from |
|00000c00| 70 61 72 65 6e 74 20 70 | 72 6f 63 65 73 73 20 66 |parent p|rocess f|
|00000c10| 75 6e 63 74 69 6f 6e 0a | 20 20 20 20 20 20 20 20 |unction.| |
|00000c20| 20 20 20 20 20 20 20 20 | 28 62 75 74 20 6e 6f 74 | |(but not|
|00000c30| 20 76 61 72 69 61 62 6c | 65 29 20 64 65 66 69 6e | variabl|e) defin|
|00000c40| 69 74 69 6f 6e 73 2e 0a | 0a 20 20 20 20 34 29 20 |itions..|. 4) |
|00000c50| 20 62 75 69 6c 74 69 6e | 2d 63 64 20 73 69 6c 65 | builtin|-cd sile|
|00000c60| 6e 63 65 64 0a 20 20 20 | 20 0a 20 20 20 20 20 20 |nced. | . |
|00000c70| 20 20 49 20 63 6f 6d 6d | 65 6e 74 65 64 20 6f 75 | I comm|ented ou|
|00000c80| 74 20 74 68 65 20 73 74 | 61 74 65 6d 65 6e 74 20 |t the st|atement |
|00000c90| 77 68 69 63 68 20 70 72 | 69 6e 74 66 27 73 20 74 |which pr|intf's t|
|00000ca0| 68 65 20 64 69 72 65 63 | 74 6f 72 79 20 73 77 69 |he direc|tory swi|
|00000cb0| 74 63 68 65 64 20 74 6f | 0a 20 20 20 20 20 20 20 |tched to|. |
|00000cc0| 20 77 68 65 6e 20 62 75 | 69 6c 74 69 6e 20 27 63 | when bu|iltin 'c|
|00000cd0| 64 27 20 68 61 73 20 74 | 6f 20 72 65 73 6f 72 74 |d' has t|o resort|
|00000ce0| 20 74 6f 20 24 43 44 50 | 41 54 48 20 74 6f 20 66 | to $CDP|ATH to f|
|00000cf0| 69 6e 64 20 61 20 64 69 | 72 65 63 74 6f 72 79 2e |ind a di|rectory.|
|00000d00| 20 20 49 66 20 79 6f 75 | 0a 20 20 20 20 20 20 20 | If you|. |
|00000d10| 20 6c 69 6b 65 20 74 68 | 69 73 20 66 65 61 74 75 | like th|is featu|
|00000d20| 72 65 2c 20 6a 75 73 74 | 20 75 6e 63 6f 6d 6d 65 |re, just| uncomme|
|00000d30| 6e 74 20 6c 69 6e 65 73 | 20 31 36 30 2c 20 31 36 |nt lines| 160, 16|
|00000d40| 31 20 69 6e 20 62 75 69 | 6c 74 69 6e 73 2e 63 0a |1 in bui|ltins.c.|
|00000d50| 0a 20 20 20 20 20 20 20 | 20 49 20 68 61 76 65 20 |. | I have |
|00000d60| 63 6f 6d 6d 65 6e 74 65 | 64 20 6f 75 74 20 74 68 |commente|d out th|
|00000d70| 65 73 65 20 74 77 6f 20 | 74 72 69 70 73 20 73 6f |ese two |trips so|
|00000d80| 20 74 68 61 74 20 61 6c | 6c 20 74 68 65 20 6f 74 | that al|l the ot|
|00000d90| 68 65 72 73 20 67 65 74 | 20 74 65 73 74 65 64 2e |hers get| tested.|
|00000da0| 0a 0a 20 20 20 20 35 29 | 0a 20 20 20 20 20 20 20 |.. 5)|. |
|00000db0| 20 49 20 61 64 64 65 64 | 20 73 65 76 65 72 61 6c | I added| several|
|00000dc0| 20 75 73 65 66 75 6c 20 | 62 75 69 6c 74 69 6e 20 | useful |builtin |
|00000dd0| 66 75 6e 63 74 69 6f 6e | 73 20 74 6f 20 72 63 2e |function|s to rc.|
|00000de0| 20 20 53 65 65 20 62 65 | 6c 6f 77 20 66 6f 72 20 | See be|low for |
|00000df0| 61 20 66 75 6c 6c 0a 20 | 20 20 20 20 20 20 20 64 |a full. | d|
|00000e00| 65 73 63 72 69 70 74 69 | 6f 6e 2e 20 20 2a 54 68 |escripti|on. *Th|
|00000e10| 65 73 65 20 61 72 65 20 | 65 61 73 69 6c 79 20 72 |ese are |easily r|
|00000e20| 65 6d 6f 76 65 64 2a 2e | 20 20 49 20 66 69 67 75 |emoved*.| I figu|
|00000e30| 72 65 64 20 49 20 73 68 | 6f 75 6c 64 20 68 61 76 |red I sh|ould hav|
|00000e40| 65 20 27 65 6d 0a 20 20 | 20 20 20 20 20 20 69 6e |e 'em. | in|
|00000e50| 20 74 68 65 20 62 69 6e | 61 72 79 20 64 69 73 74 | the bin|ary dist|
|00000e60| 72 69 62 75 74 69 6f 6e | 20 62 65 63 61 75 73 65 |ribution| because|
|00000e70| 20 74 68 65 20 70 65 6f | 70 6c 65 20 6d 6f 73 74 | the peo|ple most|
|00000e80| 20 6c 69 6b 65 6c 79 20 | 74 6f 20 64 65 73 70 69 | likely |to despi|
|00000e90| 73 65 0a 20 20 20 20 20 | 20 20 20 74 68 65 6d 20 |se. | them |
|00000ea0| 77 6f 75 6c 64 20 62 65 | 20 62 65 74 74 65 72 20 |would be| better |
|00000eb0| 65 71 75 69 70 70 65 64 | 20 74 6f 20 72 65 2d 63 |equipped| to re-c|
|00000ec0| 6f 6d 70 69 6c 65 20 74 | 68 65 6d 20 6f 75 74 2e |ompile t|hem out.|
|00000ed0| 20 20 54 68 6f 73 65 20 | 6d 6f 73 74 20 6c 69 6b | Those |most lik|
|00000ee0| 65 6c 79 0a 20 20 20 20 | 20 20 20 20 74 6f 20 6c |ely. | to l|
|00000ef0| 65 61 76 65 20 74 68 65 | 6d 20 69 6e 20 65 69 74 |eave the|m in eit|
|00000f00| 68 65 72 20 68 61 76 65 | 20 6e 6f 20 70 68 69 6c |her have| no phil|
|00000f10| 6f 73 6f 70 68 69 63 61 | 6c 20 6f 62 6a 65 63 74 |osophica|l object|
|00000f20| 69 6f 6e 20 6f 72 20 61 | 72 65 20 6c 69 6b 65 6c |ion or a|re likel|
|00000f30| 79 0a 20 20 20 20 20 20 | 20 20 74 6f 20 61 70 70 |y. | to app|
|00000f40| 72 65 63 69 61 74 65 20 | 74 68 65 20 65 78 74 72 |reciate |the extr|
|00000f50| 61 20 73 74 75 66 66 2e | 0a 0a 4c 49 4e 45 20 45 |a stuff.|..LINE E|
|00000f60| 44 49 54 49 4e 47 20 41 | 4c 54 45 52 4e 41 54 49 |DITING A|LTERNATI|
|00000f70| 56 45 53 20 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |VES ****|********|
|00000f80| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000f90| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000fa0| 2a 2a 2a 2a 2a 2a 2a 2a | 0a 0a 2d 2d 2d 2d 3e 20 |********|..----> |
|00000fb0| 20 20 54 6f 20 75 73 65 | 20 74 68 65 20 72 65 61 | To use| the rea|
|00000fc0| 64 6c 69 6e 65 20 6c 69 | 62 72 61 72 79 20 79 6f |dline li|brary yo|
|00000fd0| 75 20 6e 65 65 64 20 74 | 6f 20 67 65 74 20 74 68 |u need t|o get th|
|00000fe0| 65 20 47 4e 55 20 72 65 | 61 64 6c 69 6e 65 20 6c |e GNU re|adline l|
|00000ff0| 69 62 72 61 72 79 3a 0a | 20 20 20 20 20 20 20 20 |ibrary:.| |
|00001000| 20 20 20 20 73 75 6e 73 | 69 74 65 2e 75 6e 63 2e | suns|ite.unc.|
|00001010| 65 64 75 3a 2f 70 75 62 | 2f 4c 69 6e 75 78 2f 6c |edu:/pub|/Linux/l|
|00001020| 69 62 73 2f 6c 69 62 72 | 6c 2d 32 2e 30 2e 74 61 |ibs/libr|l-2.0.ta|
|00001030| 72 2e 67 7a 0a 20 20 20 | 20 20 20 20 20 4e 6f 74 |r.gz. | Not|
|00001040| 65 20 74 68 61 74 20 73 | 74 61 74 69 63 20 6c 69 |e that s|tatic li|
|00001050| 6e 6b 69 6e 67 20 77 69 | 74 68 20 72 65 61 64 6c |nking wi|th readl|
|00001060| 69 6e 65 20 69 73 20 70 | 72 6f 62 61 62 6c 79 20 |ine is p|robably |
|00001070| 6e 6f 74 20 72 65 63 6f | 6d 6d 65 6e 64 65 64 0a |not reco|mmended.|
|00001080| 20 20 20 20 20 20 20 20 | 61 73 20 74 68 65 20 6c | |as the l|
|00001090| 69 62 72 61 72 79 20 69 | 73 20 48 55 47 45 20 28 |ibrary i|s HUGE (|
|000010a0| 6f 76 65 72 20 33 20 74 | 69 6d 65 73 20 74 68 65 |over 3 t|imes the|
|000010b0| 20 73 69 7a 65 20 6f 66 | 20 70 6c 61 69 6e 20 27 | size of| plain '|
|000010c0| 72 63 27 29 20 61 6e 64 | 20 6d 61 6b 65 73 0a 20 |rc') and| makes. |
|000010d0| 20 20 20 20 20 20 20 74 | 68 65 20 28 73 74 61 74 | t|he (stat|
|000010e0| 69 63 29 20 62 69 6e 61 | 72 79 20 66 6f 75 72 20 |ic) bina|ry four |
|000010f0| 74 69 6d 65 73 20 6c 61 | 72 67 65 72 2e 20 20 44 |times la|rger. D|
|00001100| 79 6e 61 6d 69 63 20 6c | 69 6e 6b 69 6e 67 20 64 |ynamic l|inking d|
|00001110| 6f 65 73 6e 27 74 20 63 | 68 61 6e 67 65 0a 20 20 |oesn't c|hange. |
|00001120| 20 20 20 20 20 20 74 68 | 65 20 62 69 6e 61 72 79 | th|e binary|
|00001130| 20 62 79 20 6d 6f 72 65 | 20 74 68 61 6e 20 61 20 | by more| than a |
|00001140| 66 65 77 20 62 79 74 65 | 73 2e 20 20 54 6f 20 63 |few byte|s. To c|
|00001150| 6f 6d 70 69 6c 65 20 77 | 69 74 68 20 72 65 61 64 |ompile w|ith read|
|00001160| 6c 69 6e 65 20 28 6f 72 | 0a 20 20 20 20 20 20 20 |line (or|. |
|00001170| 20 65 64 69 74 6c 69 6e | 65 29 20 65 64 69 74 20 | editlin|e) edit |
|00001180| 4d 61 6b 65 66 69 6c 65 | 20 61 6e 64 20 63 6f 6e |Makefile| and con|
|00001190| 66 69 67 2e 68 20 61 70 | 70 72 6f 70 72 69 61 74 |fig.h ap|propriat|
|000011a0| 65 6c 79 2e 20 20 53 65 | 65 20 74 68 65 20 67 65 |ely. Se|e the ge|
|000011b0| 6e 65 72 69 63 0a 20 20 | 20 20 20 20 20 20 75 6e |neric. | un|
|000011c0| 69 78 20 69 6e 73 74 72 | 75 63 74 69 6f 6e 73 2e |ix instr|uctions.|
|000011d0| 0a 0a 2d 2d 2d 2d 3e 20 | 20 20 59 6f 75 20 63 61 |..----> | You ca|
|000011e0| 6e 20 61 6c 73 6f 20 75 | 73 65 20 74 68 65 20 27 |n also u|se the '|
|000011f0| 65 64 69 74 6c 69 6e 65 | 27 20 70 6c 75 67 2d 69 |editline|' plug-i|
|00001200| 6e 20 72 65 70 6c 61 63 | 65 6d 65 6e 74 20 66 6f |n replac|ement fo|
|00001210| 72 20 72 65 61 64 6c 69 | 6e 65 20 77 68 69 63 68 |r readli|ne which|
|00001220| 0a 20 20 20 20 20 20 20 | 20 69 73 20 64 69 73 74 |. | is dist|
|00001230| 72 69 62 75 74 65 64 20 | 69 6e 20 74 68 65 20 70 |ributed |in the p|
|00001240| 61 63 6b 61 67 65 20 66 | 6f 72 20 62 75 69 6c 64 |ackage f|or build|
|00001250| 69 6e 67 20 73 68 61 72 | 61 62 6c 65 20 6c 69 6e |ing shar|able lin|
|00001260| 75 78 20 6c 69 62 72 61 | 72 69 65 73 2c 0a 20 20 |ux libra|ries,. |
|00001270| 20 20 20 20 20 20 20 20 | 20 20 73 75 6e 73 69 74 | | sunsit|
|00001280| 65 2e 75 6e 63 2e 65 64 | 75 3a 2f 70 75 62 2f 4c |e.unc.ed|u:/pub/L|
|00001290| 69 6e 75 78 2f 47 43 43 | 2f 73 72 63 2f 74 6f 6f |inux/GCC|/src/too|
|000012a0| 6c 73 2d 32 2e 31 31 2e | 67 7a 0a 20 20 20 20 20 |ls-2.11.|gz. |
|000012b0| 20 20 20 49 20 68 61 76 | 65 6e 27 74 20 66 6f 75 | I hav|en't fou|
|000012c0| 6e 64 20 69 74 20 74 6f | 20 65 64 69 74 20 61 73 |nd it to| edit as|
|000012d0| 20 72 65 6c 69 61 62 6c | 79 20 61 73 20 72 65 61 | reliabl|y as rea|
|000012e0| 64 6c 69 6e 65 20 74 68 | 6f 75 67 68 2e 20 20 49 |dline th|ough. I|
|000012f0| 74 20 6f 6e 6c 79 0a 20 | 20 20 20 20 20 20 20 61 |t only. | a|
|00001300| 64 64 73 20 6c 69 6b 65 | 20 31 30 4b 20 74 6f 20 |dds like| 10K to |
|00001310| 74 68 65 20 73 74 61 74 | 69 63 20 62 69 6e 61 72 |the stat|ic binar|
|00001320| 79 20 74 68 6f 75 67 68 | 2e 20 20 4d 61 79 62 65 |y though|. Maybe|
|00001330| 20 77 65 20 73 68 6f 75 | 6c 64 20 65 6e 63 6f 75 | we shou|ld encou|
|00001340| 72 61 67 65 0a 20 20 20 | 20 20 20 20 20 74 68 65 |rage. | the|
|00001350| 20 61 75 74 68 6f 72 20 | 74 6f 20 6d 61 6b 65 20 | author |to make |
|00001360| 69 74 20 61 20 6c 69 74 | 74 6c 65 20 73 74 72 6f |it a lit|tle stro|
|00001370| 6e 67 65 72 2e 0a 0a 2d | 2d 2d 2d 3e 20 20 20 59 |nger...-|---> Y|
|00001380| 65 74 20 61 6e 6f 74 68 | 65 72 20 61 6c 74 65 72 |et anoth|er alter|
|00001390| 6e 61 74 69 76 65 20 69 | 73 20 74 6f 20 67 65 74 |native i|s to get|
|000013a0| 20 6d 79 20 76 65 72 79 | 20 65 6e 68 61 6e 63 65 | my very| enhance|
|000013b0| 64 20 76 65 72 73 69 6f | 6e 20 6f 66 20 27 69 6c |d versio|n of 'il|
|000013c0| 65 27 20 66 6f 72 0a 20 | 20 20 20 20 20 20 20 4c |e' for. | L|
|000013d0| 69 6e 75 78 2e 20 20 54 | 72 61 64 69 74 69 6f 6e |inux. T|radition|
|000013e0| 61 6c 6c 79 20 70 73 65 | 75 64 6f 2d 74 65 72 6d |ally pse|udo-term|
|000013f0| 69 6e 61 6c 20 66 72 6f | 6e 74 2d 65 6e 64 73 20 |inal fro|nt-ends |
|00001400| 68 61 76 65 20 68 61 64 | 20 61 20 6c 6f 74 20 6f |have had| a lot o|
|00001410| 66 0a 20 20 20 20 20 20 | 20 20 74 72 6f 75 62 6c |f. | troubl|
|00001420| 65 20 74 72 61 63 6b 69 | 6e 67 20 74 68 65 20 77 |e tracki|ng the w|
|00001430| 6f 72 6b 69 6e 67 20 64 | 69 72 65 63 74 6f 72 79 |orking d|irectory|
|00001440| 20 6f 66 20 74 68 65 20 | 63 68 69 6c 64 20 61 70 | of the |child ap|
|00001450| 70 6c 69 63 61 74 69 6f | 6e 2e 0a 20 20 20 20 20 |plicatio|n.. |
|00001460| 20 20 20 41 6c 6c 20 74 | 68 61 74 20 69 73 20 6f | All t|hat is o|
|00001470| 76 65 72 20 77 69 74 68 | 20 74 68 65 20 27 2f 70 |ver with| the '/p|
|00001480| 72 6f 63 27 20 66 69 6c | 65 73 79 73 74 65 6d 2e |roc' fil|esystem.|
|00001490| 20 20 2f 70 72 6f 63 2f | 50 49 44 2f 63 77 64 20 | /proc/|PID/cwd |
|000014a0| 69 73 20 61 0a 20 20 20 | 20 20 20 20 20 73 79 6d |is a. | sym|
|000014b0| 62 6f 6c 69 63 20 6c 69 | 6e 6b 20 74 6f 20 63 75 |bolic li|nk to cu|
|000014c0| 72 72 65 6e 74 20 77 6f | 72 6b 69 6e 67 20 64 69 |rrent wo|rking di|
|000014d0| 72 65 63 74 6f 72 79 20 | 6f 66 20 74 68 65 20 70 |rectory |of the p|
|000014e0| 72 6f 63 65 73 73 2e 20 | 20 54 68 65 20 6d 61 73 |rocess. | The mas|
|000014f0| 74 65 72 0a 20 20 20 20 | 20 20 20 20 63 61 6e 20 |ter. | can |
|00001500| 6a 75 73 74 20 75 73 65 | 20 74 68 65 20 63 68 69 |just use| the chi|
|00001510| 6c 64 27 73 20 50 49 44 | 2e 20 20 54 68 69 73 20 |ld's PID|. This |
|00001520| 69 6e 66 6f 72 6d 61 74 | 69 6f 6e 20 69 73 20 6d |informat|ion is m|
|00001530| 61 69 6e 74 61 69 6e 65 | 64 20 62 79 20 74 68 65 |aintaine|d by the|
|00001540| 0a 20 20 20 20 20 20 20 | 20 6b 65 72 6e 65 6c 2c |. | kernel,|
|00001550| 20 61 6e 64 20 73 6f 20 | 74 68 65 20 63 77 64 20 | and so |the cwd |
|00001560| 6f 62 74 61 69 6e 65 64 | 20 69 6e 20 74 68 69 73 |obtained| in this|
|00001570| 20 77 61 79 20 2a 49 53 | 2a 20 74 68 65 20 63 77 | way *IS|* the cw|
|00001580| 64 20 28 61 6c 6d 6f 73 | 74 20 62 79 0a 20 20 20 |d (almos|t by. |
|00001590| 20 20 20 20 20 64 65 66 | 69 6e 69 74 69 6f 6e 21 | def|inition!|
|000015a0| 29 2e 20 20 54 68 65 20 | 6f 6e 6c 79 20 74 69 6d |). The |only tim|
|000015b0| 65 73 20 49 27 76 65 20 | 66 6f 75 6e 64 20 74 68 |es I've |found th|
|000015c0| 69 73 20 74 65 63 68 6e | 69 71 75 65 20 74 6f 20 |is techn|ique to |
|000015d0| 66 61 69 6c 20 77 61 73 | 0a 20 20 20 20 20 20 20 |fail was|. |
|000015e0| 20 69 6e 20 61 20 27 73 | 75 27 20 73 68 65 6c 6c | in a 's|u' shell|
|000015f0| 2c 20 77 68 65 72 65 20 | 74 68 65 20 63 6f 6d 6d |, where |the comm|
|00001600| 61 6e 64 20 6a 75 73 74 | 20 66 6f 72 6b 73 20 61 |and just| forks a|
|00001610| 20 63 6f 70 79 20 6f 66 | 20 74 68 65 20 63 75 72 | copy of| the cur|
|00001620| 72 65 6e 74 0a 20 20 20 | 20 20 20 20 20 73 68 65 |rent. | she|
|00001630| 6c 6c 2e 20 20 49 4c 45 | 20 63 6f 6e 74 69 6e 75 |ll. ILE| continu|
|00001640| 65 73 20 74 6f 20 6c 6f | 6f 6b 20 61 74 20 74 68 |es to lo|ok at th|
|00001650| 65 20 63 77 64 20 6f 66 | 20 74 68 65 20 6f 72 69 |e cwd of| the ori|
|00001660| 67 69 6e 61 6c 20 70 72 | 6f 63 65 73 73 2e 20 20 |ginal pr|ocess. |
|00001670| 54 68 69 73 0a 20 20 20 | 20 20 20 20 20 6d 69 67 |This. | mig|
|00001680| 68 74 20 62 65 20 66 69 | 78 61 62 6c 65 20 62 79 |ht be fi|xable by|
|00001690| 20 6d 6f 64 69 66 79 69 | 6e 67 20 27 73 75 27 2c | modifyi|ng 'su',|
|000016a0| 20 73 61 79 20 74 6f 20 | 73 65 74 20 61 6e 20 65 | say to |set an e|
|000016b0| 6e 76 69 72 6f 6e 6d 65 | 6e 74 20 76 61 72 69 61 |nvironme|nt varia|
|000016c0| 62 6c 65 0a 20 20 20 20 | 20 20 20 20 69 6e 20 74 |ble. | in t|
|000016d0| 68 65 20 69 6e 69 74 69 | 61 6c 20 70 72 6f 63 65 |he initi|al proce|
|000016e0| 73 73 20 6f 72 20 73 6f | 6d 65 74 68 69 6e 67 2e |ss or so|mething.|
|000016f0| 20 20 49 27 76 65 20 61 | 6c 73 6f 20 61 64 64 65 | I've a|lso adde|
|00001700| 64 20 61 20 66 6f 72 77 | 61 72 64 20 68 69 73 74 |d a forw|ard hist|
|00001710| 6f 72 79 0a 20 20 20 20 | 20 20 20 20 73 65 61 72 |ory. | sear|
|00001720| 63 68 2c 20 61 6e 64 20 | 61 20 66 65 77 20 6f 74 |ch, and |a few ot|
|00001730| 68 65 72 20 74 68 69 6e | 67 73 2e 20 20 53 65 65 |her thin|gs. See|
|00001740| 20 74 68 65 20 49 4c 45 | 20 70 61 63 6b 61 67 65 | the ILE| package|
|00001750| 20 66 6f 72 20 66 75 6c | 6c 20 64 65 74 61 69 6c | for ful|l detail|
|00001760| 73 2e 0a 0a 20 20 20 20 | 20 20 20 20 41 64 64 69 |s... | Addi|
|00001770| 74 69 6f 6e 61 6c 6c 79 | 20 2f 70 72 6f 63 2f 50 |tionally| /proc/P|
|00001780| 49 44 2f 65 6e 76 69 72 | 6f 6e 20 61 6c 6c 6f 77 |ID/envir|on allow|
|00001790| 73 20 74 68 65 20 70 73 | 65 75 64 6f 2d 74 65 72 |s the ps|eudo-ter|
|000017a0| 6d 69 6e 61 6c 20 66 72 | 6f 6e 74 2d 65 6e 64 0a |minal fr|ont-end.|
|000017b0| 20 20 20 20 20 20 20 20 | 74 6f 20 61 6c 6c 6f 77 | |to allow|
|000017c0| 20 63 6f 6e 66 69 67 75 | 72 61 74 69 6f 6e 20 6f | configu|ration o|
|000017d0| 70 74 69 6f 6e 73 20 76 | 69 61 20 73 68 65 6c 6c |ptions v|ia shell|
|000017e0| 20 65 6e 76 69 72 6f 6e | 6d 65 6e 74 20 76 61 72 | environ|ment var|
|000017f0| 69 61 62 6c 65 73 20 6c | 69 6b 65 0a 20 20 20 20 |iables l|ike. |
|00001800| 20 20 20 20 24 46 49 4e | 47 4e 4f 52 45 2e 20 20 | $FIN|GNORE. |
|00001810| 49 20 68 61 76 65 6e 27 | 74 20 79 65 74 20 69 6d |I haven'|t yet im|
|00001820| 70 6c 65 6d 65 6e 74 65 | 64 20 74 68 69 73 20 73 |plemente|d this s|
|00001830| 74 75 66 66 20 79 65 74 | 2e 0a 0a 2d 2d 2d 2d 3e |tuff yet|...---->|
|00001840| 20 20 20 54 68 65 72 65 | 20 61 72 65 20 61 20 66 | There| are a f|
|00001850| 65 77 20 6f 74 68 65 72 | 20 70 73 65 75 64 6f 2d |ew other| pseudo-|
|00001860| 74 65 72 6d 69 6e 61 6c | 20 66 72 6f 6e 74 2d 65 |terminal| front-e|
|00001870| 6e 64 73 20 28 61 74 74 | 79 2c 20 66 65 2c 20 72 |nds (att|y, fe, r|
|00001880| 6b 62 64 2c 2e 2e 29 0a | 20 20 20 20 20 20 20 20 |kbd,..).| |
|00001890| 74 68 65 20 66 69 72 73 | 74 20 6f 66 20 77 68 69 |the firs|t of whi|
|000018a0| 63 68 20 69 73 20 70 75 | 72 70 6f 72 74 65 64 20 |ch is pu|rported |
|000018b0| 74 6f 20 77 6f 72 6b 20 | 77 65 6c 6c 20 75 6e 64 |to work |well und|
|000018c0| 65 72 20 4c 69 6e 75 78 | 2e 20 20 54 72 79 20 74 |er Linux|. Try t|
|000018d0| 68 6f 73 65 0a 20 20 20 | 20 20 20 20 20 6f 75 74 |hose. | out|
|000018e0| 20 61 73 20 77 65 6c 6c | 2c 20 69 66 20 79 6f 75 | as well|, if you|
|000018f0| 20 64 6f 6e 27 74 20 6c | 69 6b 65 20 52 65 61 64 | don't l|ike Read|
|00001900| 4c 69 6e 65 20 6f 72 20 | 49 4c 45 20 28 49 6e 74 |Line or |ILE (Int|
|00001910| 65 72 61 63 74 69 76 65 | 20 4c 69 6e 65 20 45 64 |eractive| Line Ed|
|00001920| 2e 29 2e 0a 0a 4e 4f 54 | 45 53 20 4f 4e 20 4d 59 |.)...NOT|ES ON MY|
|00001930| 20 41 44 44 45 44 20 42 | 55 49 4c 54 49 4e 53 20 | ADDED B|UILTINS |
|00001940| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001950| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001960| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001970| 2a 2a 2a 2a 0a 0a 49 20 | 61 6c 74 65 72 65 64 20 |****..I |altered |
|00001980| 74 68 65 20 4d 61 6b 65 | 66 69 6c 65 20 69 6e 74 |the Make|file int|
|00001990| 65 72 66 61 63 65 20 74 | 6f 20 62 75 69 6c 74 69 |erface t|o builti|
|000019a0| 6e 73 20 74 6f 20 75 6e | 64 65 72 73 74 61 6e 64 |ns to un|derstand|
|000019b0| 20 61 6c 6c 20 66 69 6c | 65 73 20 6f 66 20 74 68 | all fil|es of th|
|000019c0| 65 0a 66 6f 72 6d 20 62 | 5f 2a 2e 63 20 74 6f 20 |e.form b|_*.c to |
|000019d0| 62 65 20 61 64 64 6f 6e | 73 2e 20 20 59 6f 75 20 |be addon|s. You |
|000019e0| 6d 61 79 20 68 61 76 65 | 20 74 6f 20 63 68 61 6e |may have| to chan|
|000019f0| 67 65 20 74 68 69 73 20 | 74 6f 20 61 6e 20 65 78 |ge this |to an ex|
|00001a00| 70 6c 69 63 69 74 20 6c | 69 73 74 0a 69 66 20 79 |plicit l|ist.if y|
|00001a10| 6f 75 20 64 6f 6e 27 74 | 20 68 61 76 65 20 74 68 |ou don't| have th|
|00001a20| 65 20 47 4e 55 20 6d 61 | 6b 65 2e 20 59 6f 75 20 |e GNU ma|ke. You |
|00001a30| 61 6c 73 6f 20 6d 69 67 | 68 74 20 63 68 61 6e 67 |also mig|ht chang|
|00001a40| 65 20 69 74 20 74 6f 20 | 73 65 6c 65 63 74 69 76 |e it to |selectiv|
|00001a50| 65 6c 79 20 72 65 6d 6f | 76 65 0a 73 6f 6d 65 20 |ely remo|ve.some |
|00001a60| 6f 66 20 6d 79 20 62 75 | 69 6c 74 69 6e 73 2e 20 |of my bu|iltins. |
|00001a70| 20 49 20 68 61 76 65 20 | 4e 4f 54 20 75 70 64 61 | I have |NOT upda|
|00001a80| 74 65 64 20 74 68 65 20 | 72 63 20 6d 61 6e 20 70 |ted the |rc man p|
|00001a90| 61 67 65 20 74 6f 20 72 | 65 66 6c 65 63 74 20 74 |age to r|eflect t|
|00001aa0| 68 65 73 65 0a 62 75 69 | 6c 74 69 6e 20 63 6f 6d |hese.bui|ltin com|
|00001ab0| 6d 61 6e 64 73 2e 20 20 | 46 6f 72 20 61 6e 64 20 |mands. |For and |
|00001ac0| 65 78 70 6c 61 6e 61 74 | 69 6f 6e 20 6f 66 20 77 |explanat|ion of w|
|00001ad0| 68 61 74 20 74 68 65 79 | 20 64 6f 2c 20 73 65 65 |hat they| do, see|
|00001ae0| 20 65 61 63 68 20 62 5f | 2a 2e 63 20 6c 69 6e 65 | each b_|*.c line|
|00001af0| 0a 62 65 6c 6f 77 2e 0a | 0a 57 69 74 68 20 6e 6f |.below..|.With no|
|00001b00| 20 65 78 74 72 61 20 62 | 75 69 6c 74 69 6e 73 2c | extra b|uiltins,|
|00001b10| 20 72 63 20 69 73 20 36 | 32 34 36 38 20 62 79 74 | rc is 6|2468 byt|
|00001b20| 65 73 20 28 64 79 6e 61 | 6d 69 63 29 20 6f 72 20 |es (dyna|mic) or |
|00001b30| 38 32 39 34 38 20 28 73 | 74 61 74 69 63 29 2e 20 |82948 (s|tatic). |
|00001b40| 20 57 69 74 68 0a 6d 79 | 20 62 75 69 6c 74 69 6e | With.my| builtin|
|00001b50| 73 20 66 6f 72 20 74 65 | 73 74 2c 20 65 78 70 72 |s for te|st, expr|
|00001b60| 2c 20 67 65 74 6f 70 74 | 73 2c 20 72 65 61 64 2c |, getopt|s, read,|
|00001b70| 20 73 65 71 2c 20 73 73 | 75 62 2c 20 69 74 20 69 | seq, ss|ub, it i|
|00001b80| 73 20 37 34 37 35 36 20 | 62 79 74 65 73 2c 20 6f |s 74756 |bytes, o|
|00001b90| 6e 6c 79 0a 31 32 32 38 | 38 20 62 79 74 65 73 20 |nly.1228|8 bytes |
|00001ba0| 6f 72 20 32 30 25 20 6c | 61 72 67 65 72 2e 20 20 |or 20% l|arger. |
|00001bb0| 54 68 65 20 73 74 61 74 | 69 63 20 62 69 6e 61 72 |The stat|ic binar|
|00001bc0| 79 20 62 65 63 6f 6d 65 | 73 20 31 31 35 37 31 36 |y become|s 115716|
|00001bd0| 20 62 79 74 65 73 2c 20 | 33 32 37 36 38 20 62 79 | bytes, |32768 by|
|00001be0| 74 65 73 0a 6f 72 20 34 | 30 25 20 6c 61 72 67 65 |tes.or 4|0% large|
|00001bf0| 72 2e 20 20 44 65 70 65 | 6e 64 69 6e 67 20 6f 6e |r. Depe|nding on|
|00001c00| 20 74 68 65 20 73 75 62 | 73 65 74 20 6f 66 20 62 | the sub|set of b|
|00001c10| 75 69 6c 74 69 6e 73 20 | 79 6f 75 20 77 61 6e 74 |uiltins |you want|
|00001c20| 2c 20 79 6f 75 20 63 61 | 6e 20 6d 61 6b 65 20 74 |, you ca|n make t|
|00001c30| 68 69 73 0a 62 69 6e 61 | 72 79 20 73 69 7a 65 20 |his.bina|ry size |
|00001c40| 68 69 74 20 61 73 20 73 | 6d 61 6c 6c 20 61 73 20 |hit as s|mall as |
|00001c50| 64 65 73 69 72 65 64 2e | 20 20 45 76 65 6e 20 77 |desired.| Even w|
|00001c60| 69 74 68 20 74 68 65 20 | 6b 69 74 63 68 65 6e 20 |ith the |kitchen |
|00001c70| 73 69 6e 6b 2c 20 72 63 | 20 69 73 20 73 74 69 6c |sink, rc| is stil|
|00001c80| 6c 0a 73 6d 61 6c 6c 65 | 72 20 74 68 61 6e 20 61 |l.smalle|r than a|
|00001c90| 6c 6d 6f 73 74 20 61 6e | 79 20 6f 74 68 65 72 20 |lmost an|y other |
|00001ca0| 73 68 65 6c 6c 20 62 79 | 20 61 20 73 69 67 6e 69 |shell by| a signi|
|00001cb0| 66 69 63 61 6e 74 20 6d | 61 72 67 69 6e 2e 20 20 |ficant m|argin. |
|00001cc0| 54 68 65 20 6f 6e 6c 79 | 20 72 65 61 6c 0a 63 6f |The only| real.co|
|00001cd0| 6d 70 65 74 69 74 6f 72 | 20 69 73 20 61 73 68 2e |mpetitor| is ash.|
|00001ce0| 20 20 43 73 68 2c 20 6b | 73 68 2c 20 62 61 73 68 | Csh, k|sh, bash|
|00001cf0| 2c 20 74 63 73 68 2c 20 | 7a 73 68 2c 2e 2e 2e 20 |, tcsh, |zsh,... |
|00001d00| 20 64 6f 6e 27 74 20 65 | 76 65 6e 20 63 6f 6d 65 | don't e|ven come|
|00001d10| 20 63 6c 6f 73 65 28 75 | 6e 6c 65 73 73 0a 79 6f | close(u|nless.yo|
|00001d20| 75 20 63 6f 6d 70 69 6c | 65 20 72 65 61 64 6c 69 |u compil|e readli|
|00001d30| 6e 65 20 69 6e 20 73 74 | 61 74 69 63 61 6c 6c 79 |ne in st|atically|
|00001d40| 21 29 2e 0a 0a 49 20 72 | 61 6e 20 73 6f 6d 65 20 |!)...I r|an some |
|00001d50| 70 65 72 66 6f 72 6d 61 | 6e 63 65 20 74 65 73 74 |performa|nce test|
|00001d60| 73 2e 20 20 54 6f 20 64 | 6f 20 61 6c 6c 20 6b 69 |s. To d|o all ki|
|00001d70| 6e 64 73 20 6f 66 20 73 | 74 61 74 28 29 27 73 20 |nds of s|tat()'s |
|00001d80| 74 6f 6f 6b 20 6f 6e 6c | 79 20 2e 30 36 20 73 65 |took onl|y .06 se|
|00001d90| 63 0a 72 65 61 6c 20 74 | 69 6d 65 20 77 69 74 68 |c.real t|ime with|
|00001da0| 20 74 68 65 20 62 75 69 | 6c 74 69 6e 20 74 65 73 | the bui|ltin tes|
|00001db0| 74 2c 20 77 68 69 6c 65 | 20 69 74 20 74 6f 6f 6b |t, while| it took|
|00001dc0| 20 6f 76 65 72 20 31 2e | 39 20 73 65 63 20 72 65 | over 1.|9 sec re|
|00001dd0| 61 6c 20 74 69 6d 65 20 | 66 6f 72 0a 74 68 65 20 |al time |for.the |
|00001de0| 65 78 61 63 74 20 73 61 | 6d 65 20 74 65 73 74 73 |exact sa|me tests|
|00001df0| 20 75 73 69 6e 67 20 61 | 6e 20 65 78 74 65 72 6e | using a|n extern|
|00001e00| 61 6c 20 70 72 6f 67 72 | 61 6d 2e 20 20 54 68 61 |al progr|am. Tha|
|00001e10| 74 27 73 20 61 20 66 61 | 63 74 6f 72 20 6f 66 20 |t's a fa|ctor of |
|00001e20| 33 30 20 66 6f 6c 6b 73 | 2e 0a 54 68 65 20 69 6d |30 folks|..The im|
|00001e30| 70 72 6f 76 65 6d 65 6e | 74 20 66 6f 72 20 62 75 |provemen|t for bu|
|00001e40| 69 6c 74 69 6e 20 27 65 | 78 70 72 27 20 69 73 6e |iltin 'e|xpr' isn|
|00001e50| 27 74 20 61 73 20 73 70 | 65 63 74 61 63 75 6c 61 |'t as sp|ectacula|
|00001e60| 72 2c 20 6f 6e 6c 79 20 | 61 20 32 2e 32 35 20 66 |r, only |a 2.25 f|
|00001e70| 6f 6c 64 0a 69 6e 63 72 | 65 61 73 65 20 69 6e 20 |old.incr|ease in |
|00001e80| 73 70 65 65 64 2e 20 20 | 42 75 74 20 73 74 69 6c |speed. |But stil|
|00001e90| 6c 2e 2e 2e 20 41 6e 79 | 77 61 79 2c 20 68 65 72 |l... Any|way, her|
|00001ea0| 65 27 73 20 61 20 62 72 | 69 65 66 20 64 65 73 63 |e's a br|ief desc|
|00001eb0| 72 69 70 74 69 6f 6e 20 | 6f 66 20 6d 79 0a 62 75 |ription |of my.bu|
|00001ec0| 69 6c 74 69 6e 73 2e 20 | 20 55 6e 64 65 72 20 74 |iltins. | Under t|
|00001ed0| 68 65 20 66 69 6c 65 6e | 61 6d 65 20 6f 66 20 65 |he filen|ame of e|
|00001ee0| 61 63 68 20 73 6f 75 72 | 63 65 20 49 20 6c 69 73 |ach sour|ce I lis|
|00001ef0| 74 20 69 74 73 20 2a 69 | 6e 64 69 76 69 64 75 61 |t its *i|ndividua|
|00001f00| 6c 2a 0a 63 6f 6e 74 72 | 69 62 75 74 69 6f 6e 20 |l*.contr|ibution |
|00001f10| 74 6f 20 73 74 61 74 69 | 63 20 61 6e 64 20 64 79 |to stati|c and dy|
|00001f20| 6e 61 6d 69 63 20 62 69 | 6e 61 72 79 20 73 69 7a |namic bi|nary siz|
|00001f30| 65 73 2e 20 20 41 64 64 | 69 6e 67 20 6d 75 6c 74 |es. Add|ing mult|
|00001f40| 69 70 6c 65 20 62 75 69 | 6c 74 69 6e 73 0a 2a 64 |iple bui|ltins.*d|
|00001f50| 6f 65 73 20 6e 6f 74 2a | 20 69 6e 63 75 72 20 69 |oes not*| incur i|
|00001f60| 6e 63 72 65 61 73 69 6e | 67 20 74 68 65 20 62 69 |ncreasin|g the bi|
|00001f70| 6e 61 72 79 20 62 79 20 | 74 68 65 20 73 75 6d 20 |nary by |the sum |
|00001f80| 6f 66 20 74 68 65 73 65 | 20 69 6e 64 69 76 69 64 |of these| individ|
|00001f90| 75 61 6c 20 63 6f 6e 2d | 0a 74 72 69 62 75 74 69 |ual con-|.tributi|
|00001fa0| 6f 6e 73 20 62 65 63 61 | 75 73 65 20 6f 66 20 70 |ons beca|use of p|
|00001fb0| 61 64 64 69 6e 67 20 6f | 75 74 20 74 6f 20 70 61 |adding o|ut to pa|
|00001fc0| 67 65 20 62 6f 75 6e 64 | 61 72 69 65 73 20 61 6e |ge bound|aries an|
|00001fd0| 64 20 6a 6f 69 6e 74 20 | 75 73 65 20 6f 66 20 74 |d joint |use of t|
|00001fe0| 68 65 20 73 61 6d 65 0a | 6c 69 62 72 61 72 79 20 |he same.|library |
|00001ff0| 66 75 6e 63 74 69 6f 6e | 73 28 73 74 72 69 6e 67 |function|s(string|
|00002000| 2c 20 73 74 64 69 6f 2c | 20 65 74 63 29 2e 0a 0a |, stdio,| etc)...|
|00002010| 62 5f 65 78 70 72 2e 63 | 20 53 69 6d 70 6c 65 20 |b_expr.c| Simple |
|00002020| 65 78 70 72 20 77 69 74 | 68 20 62 75 67 67 79 20 |expr wit|h buggy |
|00002030| 27 28 27 20 68 61 6e 64 | 6c 69 6e 67 2e 20 20 4e |'(' hand|ling. N|
|00002040| 65 65 64 20 74 6f 20 66 | 69 78 20 74 68 61 74 2e |eed to f|ix that.|
|00002050| 20 20 41 6c 73 6f 0a 32 | 30 34 38 30 28 73 29 20 | Also.2|0480(s) |
|00002060| 64 6f 65 73 6e 27 74 20 | 64 6f 20 27 3a 27 20 6d |doesn't |do ':' m|
|00002070| 6f 64 65 2e 20 20 41 73 | 20 61 6e 20 65 78 74 65 |ode. As| an exte|
|00002080| 72 6e 61 6c 20 70 72 6f | 67 72 61 6d 20 75 6e 64 |rnal pro|gram und|
|00002090| 65 72 20 4c 69 6e 75 78 | 20 74 68 69 73 0a 34 30 |er Linux| this.40|
|000020a0| 39 36 28 64 29 20 20 69 | 73 20 6f 6e 6c 79 20 31 |96(d) i|s only 1|
|000020b0| 2e 35 4b 2c 20 77 68 69 | 6c 65 20 74 68 65 20 47 |.5K, whi|le the G|
|000020c0| 4e 55 20 65 78 70 72 20 | 69 73 20 6f 76 65 72 20 |NU expr |is over |
|000020d0| 33 35 4b 2e 20 20 47 6f | 20 66 69 67 75 72 65 2e |35K. Go| figure.|
|000020e0| 20 20 49 0a 20 20 20 20 | 20 20 20 20 20 64 6f 6e | I. | don|
|000020f0| 27 74 20 74 68 69 6e 6b | 20 69 74 27 73 20 6f 6e |'t think| it's on|
|00002100| 6c 79 20 62 65 63 61 75 | 73 65 20 6f 66 20 27 3a |ly becau|se of ':|
|00002110| 27 20 65 69 74 68 65 72 | 20 3b 2d 29 2e 20 20 49 |' either| ;-). I|
|00002120| 66 20 64 65 73 69 72 65 | 64 0a 20 20 20 20 20 20 |f desire|d. |
|00002130| 20 20 20 74 68 65 20 73 | 74 61 74 69 63 20 63 6f | the s|tatic co|
|00002140| 6e 74 72 69 62 75 74 69 | 6f 6e 20 6f 66 20 65 78 |ntributi|on of ex|
|00002150| 70 72 20 63 6f 75 6c 64 | 20 62 65 20 67 72 65 61 |pr could| be grea|
|00002160| 74 6c 79 20 64 69 6d 69 | 6e 69 73 68 65 64 20 62 |tly dimi|nished b|
|00002170| 79 0a 20 20 20 20 20 20 | 20 20 20 72 65 6d 6f 76 |y. | remov|
|00002180| 69 6e 20 74 68 65 20 22 | 70 72 69 6e 74 66 22 20 |in the "|printf" |
|00002190| 72 65 66 65 72 65 6e 63 | 65 2e 20 20 41 6e 20 69 |referenc|e. An i|
|000021a0| 74 6f 61 28 29 20 66 75 | 6e 63 74 69 6f 6e 20 77 |toa() fu|nction w|
|000021b0| 6f 75 6c 64 20 74 68 65 | 6e 0a 20 20 20 20 20 20 |ould the|n. |
|000021c0| 20 20 20 62 65 20 6e 65 | 65 64 65 64 2e 20 20 46 | be ne|eded. F|
|000021d0| 65 65 6c 20 66 72 65 65 | 2e 20 20 4d 61 69 6c 20 |eel free|. Mail |
|000021e0| 6d 65 20 74 68 65 20 70 | 61 74 63 68 2e 0a 0a 62 |me the p|atch...b|
|000021f0| 5f 74 65 73 74 2e 63 20 | 45 6e 68 61 6e 63 65 64 |_test.c |Enhanced|
|00002200| 20 74 65 73 74 2e 20 20 | 4f 6e 6c 79 20 72 65 61 | test. |Only rea|
|00002210| 6c 20 64 69 66 66 65 72 | 65 6e 63 65 20 66 72 6f |l differ|ence fro|
|00002220| 6d 20 74 68 65 20 47 4e | 55 20 74 65 73 74 20 69 |m the GN|U test i|
|00002230| 73 20 74 68 61 74 0a 34 | 30 39 36 28 73 29 20 20 |s that.4|096(s) |
|00002240| 74 68 65 72 65 27 73 20 | 61 20 27 2d 68 27 20 66 |there's |a '-h' f|
|00002250| 6c 61 67 20 74 6f 20 74 | 65 6c 6c 20 79 6f 75 20 |lag to t|ell you |
|00002260| 74 68 61 74 20 61 20 66 | 69 6c 65 20 68 61 73 20 |that a f|ile has |
|00002270| 6d 6f 72 65 20 74 68 61 | 6e 20 31 20 68 61 72 64 |more tha|n 1 hard|
|00002280| 0a 38 31 39 32 28 64 29 | 20 20 6c 69 6e 6b 2e 20 |.8192(d)| link. |
|00002290| 20 41 6e 64 20 69 74 27 | 73 20 66 61 73 74 65 72 | And it'|s faster|
|000022a0| 20 74 68 61 6e 20 74 68 | 65 20 47 4e 55 20 74 65 | than th|e GNU te|
|000022b0| 73 74 20 63 6f 64 65 20 | 62 79 20 35 25 20 6f 72 |st code |by 5% or|
|000022c0| 20 73 6f 20 28 61 73 20 | 61 6e 0a 20 20 20 20 20 | so (as |an. |
|000022d0| 20 20 20 20 65 78 74 65 | 72 6e 61 6c 20 70 72 6f | exte|rnal pro|
|000022e0| 67 72 61 6d 2c 20 6f 66 | 20 63 6f 75 72 73 65 20 |gram, of| course |
|000022f0| 3a 2d 29 2e 20 20 41 6c | 73 6f 2c 20 69 6e 20 6d |:-). Al|so, in m|
|00002300| 79 20 74 65 73 74 2c 20 | 74 68 65 20 63 6c 6f 73 |y test, |the clos|
|00002310| 69 6e 67 0a 20 20 20 20 | 20 20 20 20 20 27 5d 27 |ing. | ']'|
|00002320| 20 69 73 20 6f 70 74 69 | 6f 6e 61 6c 2e 20 20 4e | is opti|onal. N|
|00002330| 6f 74 65 20 61 6c 73 6f | 20 74 68 61 74 20 69 66 |ote also| that if|
|00002340| 20 27 3d 27 20 69 73 6e | 27 74 20 71 75 6f 74 65 | '=' isn|'t quote|
|00002350| 64 2c 20 72 63 20 67 65 | 74 73 0a 20 20 20 20 20 |d, rc ge|ts. |
|00002360| 20 20 20 20 63 6f 6e 66 | 75 73 65 64 2e 20 20 54 | conf|used. T|
|00002370| 68 69 73 20 68 61 70 70 | 65 6e 73 20 77 69 74 68 |his happ|ens with|
|00002380| 20 61 6c 6c 20 63 6f 6d | 6d 61 6e 64 73 20 61 6e | all com|mands an|
|00002390| 64 20 65 78 74 65 72 6e | 61 6c 20 70 72 6f 67 72 |d extern|al progr|
|000023a0| 61 6d 73 20 74 6f 6f 2c | 0a 20 20 20 20 20 20 20 |ams too,|. |
|000023b0| 20 20 65 2e 67 2e 20 27 | 64 64 27 2e 0a 0a 42 6f | e.g. '|dd'...Bo|
|000023c0| 74 68 20 62 5f 65 78 70 | 72 2e 63 20 61 6e 64 20 |th b_exp|r.c and |
|000023d0| 62 5f 74 65 73 74 2e 63 | 20 61 72 65 20 73 65 74 |b_test.c| are set|
|000023e0| 20 75 70 20 74 6f 20 62 | 65 20 6d 61 64 65 20 69 | up to b|e made i|
|000023f0| 6e 74 6f 20 65 78 74 65 | 72 6e 61 6c 20 70 72 6f |nto exte|rnal pro|
|00002400| 67 72 61 6d 73 0a 69 66 | 20 63 6f 6d 70 69 6c 65 |grams.if| compile|
|00002410| 64 20 77 69 74 68 6f 75 | 74 20 41 44 44 4f 4e 20 |d withou|t ADDON |
|00002420| 64 65 66 69 6e 65 64 2c | 20 69 6e 20 63 61 73 65 |defined,| in case|
|00002430| 20 79 6f 75 20 77 61 6e | 74 20 61 20 2a 74 69 6e | you wan|t a *tin|
|00002440| 79 2a 20 72 65 70 6c 61 | 63 65 6d 65 6e 74 20 66 |y* repla|cement f|
|00002450| 6f 72 0a 74 68 65 20 47 | 4e 55 20 75 74 69 6c 69 |or.the G|NU utili|
|00002460| 74 69 65 73 2c 20 66 6f | 72 20 73 61 79 20 61 20 |ties, fo|r say a |
|00002470| 62 6f 6f 74 2f 72 65 63 | 6f 76 65 72 79 20 66 6c |boot/rec|overy fl|
|00002480| 6f 70 70 79 20 6f 72 20 | 73 6f 6d 65 74 68 69 6e |oppy or |somethin|
|00002490| 67 2e 0a 0a 62 5f 72 65 | 61 64 2e 63 20 54 68 65 |g...b_re|ad.c The|
|000024a0| 20 66 69 6e 61 6c 2c 20 | 62 65 73 74 20 62 75 69 | final, |best bui|
|000024b0| 6c 74 69 6e 20 72 65 61 | 64 20 66 72 6f 6d 20 74 |ltin rea|d from t|
|000024c0| 68 65 20 72 63 20 6d 61 | 69 6c 69 6e 67 20 6c 69 |he rc ma|iling li|
|000024d0| 73 74 2e 20 20 52 65 61 | 64 73 20 61 6e 0a 30 28 |st. Rea|ds an.0(|
|000024e0| 73 29 20 20 20 20 20 65 | 6e 74 69 72 65 20 6c 69 |s) e|ntire li|
|000024f0| 6e 65 20 69 6e 74 6f 20 | 61 20 73 69 6e 67 6c 65 |ne into |a single|
|00002500| 20 76 61 72 69 61 62 6c | 65 2e 20 20 49 66 20 79 | variabl|e. If y|
|00002510| 6f 75 20 77 61 6e 74 20 | 6d 75 6c 74 69 70 6c 65 |ou want |multiple|
|00002520| 20 76 61 72 69 61 62 6c | 65 73 2c 0a 30 28 64 29 | variabl|es,.0(d)|
|00002530| 20 20 20 20 20 79 6f 75 | 20 63 61 6e 20 74 72 69 | you| can tri|
|00002540| 76 69 61 6c 6c 79 20 77 | 72 69 74 65 20 61 20 27 |vially w|rite a '|
|00002550| 52 65 61 64 27 20 66 75 | 6e 63 74 69 6f 6e 20 74 |Read' fu|nction t|
|00002560| 6f 20 64 6f 20 74 68 65 | 20 70 72 6f 70 65 72 20 |o do the| proper |
|00002570| 77 6f 72 64 0a 20 20 20 | 20 20 20 20 20 20 73 70 |word. | sp|
|00002580| 6c 69 74 74 69 6e 67 20 | 61 6e 64 20 61 73 73 69 |litting |and assi|
|00002590| 67 6e 6d 65 6e 74 2e 20 | 20 54 68 65 20 69 6d 70 |gnment. | The imp|
|000025a0| 6f 72 74 61 6e 74 20 74 | 68 69 6e 67 20 61 62 6f |ortant t|hing abo|
|000025b0| 75 74 20 74 68 69 73 20 | 62 75 69 6c 74 69 6e 0a |ut this |builtin.|
|000025c0| 20 20 20 20 20 20 20 20 | 20 69 73 20 74 68 61 74 | | is that|
|000025d0| 20 69 74 20 64 6f 65 73 | 6e 27 74 20 62 75 66 66 | it does|n't buff|
|000025e0| 65 72 20 69 74 27 73 20 | 69 6e 70 75 74 20 2a 61 |er it's |input *a|
|000025f0| 74 20 61 6c 6c 2a 2e 20 | 20 41 6c 73 6f 20 69 6e |t all*. | Also in|
|00002600| 63 6c 75 64 65 64 20 69 | 6e 20 74 68 69 73 0a 20 |cluded i|n this. |
|00002610| 20 20 20 20 20 20 20 20 | 64 69 73 74 72 69 62 75 | |distribu|
|00002620| 74 69 6f 6e 20 69 73 20 | 27 6c 69 6e 65 2e 63 27 |tion is |'line.c'|
|00002630| 2c 20 74 68 65 20 73 6f | 75 72 63 65 20 66 6f 72 |, the so|urce for|
|00002640| 20 61 20 74 69 6e 79 20 | 65 78 74 65 72 6e 61 6c | a tiny |external|
|00002650| 20 70 72 6f 67 72 61 6d | 20 74 68 61 74 0a 20 20 | program| that. |
|00002660| 20 20 20 20 20 20 20 63 | 61 6e 20 62 65 20 63 6f | c|an be co|
|00002670| 6d 62 69 6e 65 64 20 77 | 69 74 68 20 61 20 73 68 |mbined w|ith a sh|
|00002680| 65 6c 6c 20 66 75 6e 63 | 74 69 6f 6e 20 74 6f 20 |ell func|tion to |
|00002690| 61 63 68 69 65 76 65 20 | 74 68 65 20 73 61 6d 65 |achieve |the same|
|000026a0| 20 62 65 68 61 76 69 6f | 72 0a 20 20 20 20 20 20 | behavio|r. |
|000026b0| 20 20 20 61 74 20 61 20 | 72 65 64 75 63 74 69 6f | at a |reductio|
|000026c0| 6e 20 69 6e 20 70 65 72 | 66 6f 72 6d 61 6e 63 65 |n in per|formance|
|000026d0| 2e 20 20 4e 6f 74 65 20 | 61 6c 73 6f 20 74 68 61 |. Note |also tha|
|000026e0| 74 20 69 74 20 64 6f 65 | 73 6e 27 74 20 61 64 64 |t it doe|sn't add|
|000026f0| 20 65 6e 6f 75 67 68 0a | 20 20 20 20 20 20 20 20 | enough.| |
|00002700| 20 62 79 74 65 73 20 74 | 6f 20 65 69 74 68 65 72 | bytes t|o either|
|00002710| 20 61 20 64 79 6e 61 6d | 69 63 20 2a 6f 72 2a 20 | a dynam|ic *or* |
|00002720| 61 20 73 74 61 74 69 63 | 20 65 78 65 63 75 74 61 |a static| executa|
|00002730| 62 6c 65 20 74 6f 20 61 | 64 64 20 61 6e 6f 74 68 |ble to a|dd anoth|
|00002740| 65 72 0a 20 20 20 20 20 | 20 20 20 20 70 61 67 65 |er. | page|
|00002750| 20 6f 66 20 76 69 72 74 | 75 61 6c 20 6d 65 6d 6f | of virt|ual memo|
|00002760| 72 79 21 20 20 54 68 65 | 20 73 61 6d 65 20 69 73 |ry! The| same is|
|00002770| 20 74 72 75 65 20 66 6f | 72 20 74 72 75 65 20 61 | true fo|r true a|
|00002780| 6e 64 20 66 61 6c 73 65 | 20 62 65 6c 6f 77 2e 0a |nd false| below..|
|00002790| 20 20 20 20 20 20 20 20 | 20 54 68 65 73 65 20 62 | | These b|
|000027a0| 75 69 6c 74 69 6e 73 20 | 63 6f 73 74 20 65 73 73 |uiltins |cost ess|
|000027b0| 65 6e 74 69 61 6c 6c 79 | 20 2a 6e 6f 74 68 69 6e |entially| *nothin|
|000027c0| 67 2a 20 69 6e 20 73 69 | 7a 65 2e 0a 0a 62 5f 73 |g* in si|ze...b_s|
|000027d0| 65 71 2e 63 20 20 69 73 | 20 61 20 62 75 69 6c 74 |eq.c is| a built|
|000027e0| 69 6e 20 66 6f 72 20 74 | 68 65 20 76 65 72 79 20 |in for t|he very |
|000027f0| 63 6f 6d 6d 6f 6e 6c 79 | 20 6e 65 65 64 65 64 20 |commonly| needed |
|00002800| 27 73 65 71 65 6e 63 65 | 20 6f 66 20 69 6e 74 65 |'seqence| of inte|
|00002810| 67 65 72 73 27 0a 32 30 | 39 33 30 28 73 29 20 66 |gers'.20|930(s) f|
|00002820| 75 6e 63 74 69 6f 6e 20 | 69 6e 20 27 72 63 27 20 |unction |in 'rc' |
|00002830| 66 75 6e 63 74 69 6f 6e | 73 2f 73 63 72 69 70 74 |function|s/script|
|00002840| 73 2e 20 20 49 74 27 73 | 20 75 73 65 64 20 74 6f |s. It's| used to|
|00002850| 20 72 65 66 65 72 65 6e | 63 65 20 72 61 6e 67 65 | referen|ce range|
|00002860| 73 0a 30 28 64 29 20 20 | 20 20 20 6f 66 20 65 6c |s.0(d) | of el|
|00002870| 65 6d 65 6e 74 73 20 69 | 6e 20 61 20 6c 69 73 74 |ements i|n a list|
|00002880| 2c 20 65 2e 67 2e 20 65 | 6c 65 6d 65 6e 74 73 20 |, e.g. e|lements |
|00002890| 32 20 74 6f 20 74 68 65 | 20 65 6e 64 20 6f 66 20 |2 to the| end of |
|000028a0| 27 68 69 68 6f 27 20 6d | 69 67 68 74 0a 20 20 20 |'hiho' m|ight. |
|000028b0| 20 20 20 20 20 20 62 65 | 20 72 65 66 65 72 65 6e | be| referen|
|000028c0| 63 65 64 20 62 79 20 24 | 68 69 68 6f 28 60 7b 73 |ced by $|hiho(`{s|
|000028d0| 65 71 20 32 20 24 23 68 | 69 68 6f 7d 29 2e 20 20 |eq 2 $#h|iho}). |
|000028e0| 53 65 65 20 73 6f 75 72 | 63 65 20 61 6e 64 20 72 |See sour|ce and r|
|000028f0| 63 2d 46 41 51 0a 20 20 | 20 20 20 20 20 20 20 66 |c-FAQ. | f|
|00002900| 6f 72 20 6d 6f 72 65 20 | 69 6e 66 6f 2e 0a 0a 62 |or more |info...b|
|00002910| 5f 73 73 75 62 2e 63 20 | 69 73 20 61 20 62 75 69 |_ssub.c |is a bui|
|00002920| 6c 74 69 6e 20 66 6f 72 | 20 74 68 65 20 76 65 72 |ltin for| the ver|
|00002930| 79 20 66 72 65 71 75 65 | 6e 74 20 73 75 66 66 69 |y freque|nt suffi|
|00002940| 78 2f 70 72 65 66 69 78 | 20 73 75 62 73 74 69 74 |x/prefix| substit|
|00002950| 75 74 69 6f 6e 20 6d 61 | 6e 79 0a 32 30 34 38 30 |ution ma|ny.20480|
|00002960| 28 73 29 20 6f 66 20 75 | 73 20 61 72 65 20 61 6c |(s) of u|s are al|
|00002970| 77 61 79 73 20 64 6f 69 | 6e 67 2e 20 20 45 2e 67 |ways doi|ng. E.g|
|00002980| 2e 20 77 65 20 77 61 6e | 74 20 61 20 76 61 72 69 |. we wan|t a vari|
|00002990| 61 62 6c 65 20 74 68 61 | 74 20 63 6f 6e 74 61 69 |able tha|t contai|
|000029a0| 6e 73 0a 34 30 39 36 28 | 64 29 20 20 74 68 65 20 |ns.4096(|d) the |
|000029b0| 6e 61 6d 65 73 20 6f 66 | 20 61 6c 6c 20 27 2e 63 |names of| all '.c|
|000029c0| 27 20 66 69 6c 65 73 20 | 77 69 74 68 20 6e 6f 20 |' files |with no |
|000029d0| 6d 61 74 63 68 69 6e 67 | 20 27 2e 68 27 20 66 69 |matching| '.h' fi|
|000029e0| 6c 65 73 2e 0a 20 20 20 | 20 20 20 20 20 20 54 68 |les.. | Th|
|000029f0| 65 56 61 72 3d 60 7b 66 | 6f 72 28 78 20 69 6e 20 |eVar=`{f|or(x in |
|00002a00| 2a 2e 63 29 21 20 5b 20 | 2d 66 20 60 7b 73 73 75 |*.c)! [ |-f `{ssu|
|00002a10| 62 20 24 78 20 2e 63 20 | 2e 68 7d 20 5d 26 26 65 |b $x .c |.h} ]&&e|
|00002a20| 63 68 6f 20 24 78 7d 0a | 20 20 20 20 20 20 20 20 |cho $x}.| |
|00002a30| 20 73 73 75 62 20 63 61 | 6e 20 61 6c 73 6f 20 74 | ssub ca|n also t|
|00002a40| 6f 20 2a 70 72 65 66 69 | 78 2a 20 73 75 62 73 74 |o *prefi|x* subst|
|00002a50| 69 74 69 6f 6e 20 28 73 | 73 75 62 20 2d 70 29 20 |ition (s|sub -p) |
|00002a60| 61 6e 64 20 70 61 74 68 | 20 73 74 72 69 70 70 69 |and path| strippi|
|00002a70| 6e 67 0a 20 20 20 20 20 | 20 20 20 20 6c 69 6b 65 |ng. | like|
|00002a80| 20 62 61 73 65 6e 61 6d | 65 20 28 73 73 75 62 20 | basenam|e (ssub |
|00002a90| 2d 53 29 2e 20 20 53 65 | 65 20 73 6f 75 72 63 65 |-S). Se|e source|
|00002aa0| 20 66 6f 72 20 6d 6f 72 | 65 20 69 6e 66 6f 2e 0a | for mor|e info..|
|00002ab0| 0a 62 5f 67 65 74 6f 70 | 74 2e 63 20 53 74 61 6e |.b_getop|t.c Stan|
|00002ac0| 64 61 72 64 20 67 65 74 | 6f 70 74 20 75 74 69 6c |dard get|opt util|
|00002ad0| 69 74 79 20 74 6f 20 70 | 61 72 73 65 20 6f 70 74 |ity to p|arse opt|
|00002ae0| 69 6f 6e 20 61 72 67 75 | 6d 65 6e 74 73 2e 20 20 |ion argu|ments. |
|00002af0| 42 61 73 69 63 61 6c 6c | 79 20 74 68 69 73 0a 32 |Basicall|y this.2|
|00002b00| 38 36 37 32 28 73 29 20 | 20 20 6a 75 73 74 20 70 |8672(s) | just p|
|00002b10| 75 74 73 20 61 6c 6c 20 | 6f 70 74 69 6f 6e 73 20 |uts all |options |
|00002b20| 62 65 66 6f 72 65 20 61 | 20 27 2d 2d 27 20 73 6f |before a| '--' so|
|00002b30| 20 69 66 20 79 6f 75 20 | 65 6e 74 65 72 3a 0a 30 | if you |enter:.0|
|00002b40| 28 64 29 20 20 20 20 20 | 20 20 20 20 20 27 68 69 |(d) | 'hi|
|00002b50| 68 6f 20 2d 78 20 6a 75 | 6e 6b 20 2d 79 20 6d 6f |ho -x ju|nk -y mo|
|00002b60| 72 65 5f 6a 75 6e 6b 20 | 61 72 67 31 20 2d 7a 20 |re_junk |arg1 -z |
|00002b70| 73 74 69 6c 6c 5f 6d 6f | 72 65 20 61 72 67 32 20 |still_mo|re arg2 |
|00002b80| 2d 65 67 61 64 73 27 0a | 20 20 20 20 20 20 20 20 |-egads'.| |
|00002b90| 20 20 20 67 65 74 6f 70 | 74 20 77 69 6c 6c 20 72 | getop|t will r|
|00002ba0| 65 74 75 72 6e 3a 0a 20 | 20 20 20 20 20 20 20 20 |eturn:. | |
|00002bb0| 20 20 20 20 20 27 2d 78 | 20 6a 75 6e 6b 20 2d 79 | '-x| junk -y|
|00002bc0| 20 6d 6f 72 65 5f 6a 75 | 6e 6b 20 2d 7a 20 73 74 | more_ju|nk -z st|
|00002bd0| 69 6c 6c 5f 6d 6f 72 65 | 20 2d 65 20 2d 67 20 2d |ill_more| -e -g -|
|00002be0| 61 20 2d 64 20 2d 73 20 | 2d 2d 20 61 72 67 31 20 |a -d -s |-- arg1 |
|00002bf0| 61 72 67 32 27 0a 20 20 | 20 20 20 20 20 20 20 20 |arg2'. | |
|00002c00| 20 67 65 74 6f 70 74 20 | 6d 75 73 74 20 68 61 76 | getopt |must hav|
|00002c10| 65 20 74 68 65 20 67 65 | 74 6f 70 74 20 70 61 72 |e the ge|topt par|
|00002c20| 73 65 20 73 74 72 69 6e | 67 20 61 73 20 69 74 27 |se strin|g as it'|
|00002c30| 73 20 66 69 72 73 74 20 | 61 72 67 75 6d 65 6e 74 |s first |argument|
|00002c40| 20 61 6e 64 0a 20 20 20 | 20 20 20 20 20 20 20 20 | and. | |
|00002c50| 74 68 65 20 72 65 73 74 | 20 6f 66 20 74 68 65 20 |the rest| of the |
|00002c60| 63 6f 6d 6d 61 6e 64 20 | 6c 69 6e 65 20 66 6f 6c |command |line fol|
|00002c70| 6c 6f 77 69 6e 67 20 69 | 74 2e 20 20 46 6f 72 20 |lowing i|t. For |
|00002c80| 74 68 65 20 61 62 6f 76 | 65 20 65 78 61 6d 70 6c |the abov|e exampl|
|00002c90| 65 0a 20 20 20 20 20 20 | 20 20 20 20 20 74 68 69 |e. | thi|
|00002ca0| 73 20 74 72 61 6e 73 6c | 61 74 65 73 20 69 6e 74 |s transl|ates int|
|00002cb0| 6f 3a 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |o:. | |
|00002cc0| 20 27 67 65 74 6f 70 74 | 20 78 3a 79 3a 7a 3a 65 | 'getopt| x:y:z:e|
|00002cd0| 67 61 64 73 20 24 65 6e | 74 65 72 65 64 5f 63 6f |gads $en|tered_co|
|00002ce0| 6d 6d 61 6e 64 5f 6c 69 | 6e 65 27 0a 20 20 20 20 |mmand_li|ne'. |
|00002cf0| 20 20 20 20 20 20 20 4e | 6f 74 65 3a 20 6f 72 64 | N|ote: ord|
|00002d00| 69 6e 61 72 69 6c 79 20 | 24 2a 20 64 6f 65 73 6e |inarily |$* doesn|
|00002d10| 27 74 20 69 6e 63 6c 75 | 64 65 20 61 72 67 76 5b |'t inclu|de argv[|
|00002d20| 30 5d 2c 20 62 75 74 20 | 79 6f 75 20 63 61 6e 20 |0], but |you can |
|00002d30| 69 66 20 79 6f 75 0a 20 | 20 20 20 20 20 20 20 20 |if you. | |
|00002d40| 20 20 20 20 20 20 20 20 | 77 61 6e 74 20 62 79 20 | |want by |
|00002d50| 75 73 69 6e 67 20 27 24 | 30 20 24 2a 27 20 77 65 |using '$|0 $*' we|
|00002d60| 72 65 20 49 20 68 61 76 | 65 20 24 65 6e 74 65 72 |re I hav|e $enter|
|00002d70| 65 64 5f 63 6f 6d 6d 61 | 6e 64 5f 6c 69 6e 65 2e |ed_comma|nd_line.|
|00002d80| 0a 20 20 20 20 20 20 20 | 20 20 20 20 54 68 65 20 |. | The |
|00002d90| 27 3a 27 20 69 6e 64 69 | 63 61 74 65 73 20 74 68 |':' indi|cates th|
|00002da0| 61 74 20 74 68 65 20 6f | 70 74 69 6f 6e 20 74 61 |at the o|ption ta|
|00002db0| 6b 65 73 20 61 6e 20 61 | 72 67 75 6d 65 6e 74 2e |kes an a|rgument.|
|00002dc0| 0a 20 20 20 20 20 20 20 | 20 20 20 20 53 65 65 20 |. | See |
|00002dd0| 61 6e 79 20 64 65 63 65 | 6e 74 20 6d 61 6e 20 70 |any dece|nt man p|
|00002de0| 61 67 65 20 66 6f 72 20 | 67 65 74 6f 70 74 28 33 |age for |getopt(3|
|00002df0| 29 20 6f 72 20 67 65 74 | 6f 70 74 28 31 29 20 66 |) or get|opt(1) f|
|00002e00| 6f 72 20 6d 6f 72 65 20 | 64 65 74 61 69 6c 73 2e |or more |details.|
|00002e10| 0a 0a 62 5f 74 72 75 65 | 2e 63 20 20 20 54 68 65 |..b_true|.c The|
|00002e20| 73 65 20 61 72 65 20 73 | 65 6c 66 20 65 78 70 6c |se are s|elf expl|
|00002e30| 61 6e 61 74 6f 72 79 20 | 3a 2d 29 0a 30 28 64 20 |anatory |:-).0(d |
|00002e40| 6f 72 20 73 29 0a 62 5f | 66 61 6c 73 65 2e 63 20 |or s).b_|false.c |
|00002e50| 20 57 65 6c 6c 2c 20 4f | 4b 2e 20 20 54 68 65 79 | Well, O|K. They|
|00002e60| 20 6a 75 73 74 20 72 65 | 74 75 72 6e 20 61 20 73 | just re|turn a s|
|00002e70| 74 61 74 75 73 20 6f 66 | 20 74 72 75 65 28 30 29 |tatus of| true(0)|
|00002e80| 20 6f 72 20 66 61 6c 73 | 65 28 31 29 2e 20 20 54 | or fals|e(1). T|
|00002e90| 68 69 73 20 69 73 0a 30 | 28 64 20 6f 72 20 73 29 |his is.0|(d or s)|
|00002ea0| 20 20 61 20 2a 72 65 61 | 6c 6c 79 2a 20 69 6e 74 | a *rea|lly* int|
|00002eb0| 75 69 74 69 76 65 20 74 | 68 69 6e 67 20 69 6e 20 |uitive t|hing in |
|00002ec0| 61 20 73 63 72 69 70 74 | 20 6f 72 20 66 75 6e 63 |a script| or func|
|00002ed0| 74 69 6f 6e 20 61 6e 64 | 20 61 64 64 73 20 6d 69 |tion and| adds mi|
|00002ee0| 6e 69 6d 61 6c 0a 20 20 | 20 20 20 20 20 20 20 20 |nimal. | |
|00002ef0| 20 6f 76 65 72 68 65 61 | 64 2e 20 20 4f 6e 6c 79 | overhea|d. Only|
|00002f00| 20 61 20 66 65 77 20 62 | 79 74 65 73 20 72 65 61 | a few b|ytes rea|
|00002f10| 6c 6c 79 2e 20 20 4e 6f | 74 20 65 6e 6f 75 67 68 |lly. No|t enough|
|00002f20| 20 74 6f 20 63 68 61 6e | 67 65 20 74 68 65 20 73 | to chan|ge the s|
|00002f30| 69 7a 65 20 6f 66 0a 20 | 20 20 20 20 20 20 20 20 |ize of. | |
|00002f40| 20 20 61 20 64 65 6d 61 | 6e 64 20 70 61 67 65 64 | a dema|nd paged|
|00002f50| 20 62 69 6e 61 72 79 2e | 0a 0a 49 74 20 69 73 20 | binary.|..It is |
|00002f60| 2a 73 6f 2a 20 65 61 73 | 79 20 74 6f 20 72 65 6d |*so* eas|y to rem|
|00002f70| 6f 76 65 20 74 68 65 73 | 65 20 62 75 69 6c 74 69 |ove thes|e builti|
|00002f80| 6e 73 20 74 68 61 74 20 | 49 27 6d 20 69 6e 63 6c |ns that |I'm incl|
|00002f90| 75 64 69 6e 67 20 74 68 | 65 6d 20 62 79 20 64 65 |uding th|em by de|
|00002fa0| 66 61 75 6c 74 20 66 6f | 72 0a 79 6f 75 72 20 65 |fault fo|r.your e|
|00002fb0| 6e 6a 6f 79 6d 65 6e 74 | 2e 20 20 41 6c 6c 20 79 |njoyment|. All y|
|00002fc0| 6f 75 20 6e 65 65 64 20 | 74 6f 20 64 6f 20 74 6f |ou need |to do to|
|00002fd0| 20 73 65 6c 65 63 74 69 | 76 65 6c 79 20 72 65 6d | selecti|vely rem|
|00002fe0| 6f 76 65 20 6f 6e 65 20 | 69 73 20 63 6f 6d 6d 65 |ove one |is comme|
|00002ff0| 6e 74 20 6f 75 74 0a 74 | 68 65 20 74 77 6f 20 6c |nt out.t|he two l|
|00003000| 69 6e 65 73 20 69 74 27 | 73 20 6d 65 6e 74 69 6f |ines it'|s mentio|
|00003010| 6e 65 64 20 69 6e 20 69 | 6e 20 61 64 64 6f 6e 2e |ned in i|n addon.|
|00003020| 68 20 61 6e 64 20 22 6d | 76 20 62 5f 3c 62 75 69 |h and "m|v b_<bui|
|00003030| 6c 74 69 6e 3e 2e 63 20 | 42 5f 3c 62 75 69 6c 74 |ltin>.c |B_<built|
|00003040| 69 6e 3e 2e 63 22 0a 28 | 6f 72 20 22 72 6d 20 62 |in>.c".(|or "rm b|
|00003050| 5f 3c 62 75 69 6c 74 69 | 6e 3e 2e 63 22 20 69 66 |_<builti|n>.c" if|
|00003060| 20 79 6f 75 20 2a 72 65 | 61 6c 6c 79 2a 20 68 61 | you *re|ally* ha|
|00003070| 74 65 20 69 74 20 3a 2d | 29 2e 0a 0a 59 6f 75 20 |te it :-|)...You |
|00003080| 64 6f 6e 27 74 20 65 76 | 65 6e 20 68 61 76 65 20 |don't ev|en have |
|00003090| 74 6f 20 72 65 63 6f 6d | 70 69 6c 65 20 74 68 65 |to recom|pile the|
|000030a0| 20 77 68 6f 6c 65 20 74 | 68 69 6e 67 2e 20 20 4a | whole t|hing. J|
|000030b0| 75 73 74 20 72 65 6e 61 | 6d 65 20 74 68 65 20 62 |ust rena|me the b|
|000030c0| 5f 3c 62 75 69 6c 74 69 | 6e 3e 2e 63 0a 66 69 6c |_<builti|n>.c.fil|
|000030d0| 65 20 61 6e 64 20 27 6d | 61 6b 65 27 2e 20 20 62 |e and 'm|ake'. b|
|000030e0| 75 69 6c 74 69 6e 73 2e | 6f 20 69 73 20 74 68 65 |uiltins.|o is the|
|000030f0| 20 6f 6e 6c 79 20 6d 6f | 64 75 6c 65 20 77 68 69 | only mo|dule whi|
|00003100| 63 68 20 69 6e 63 6c 75 | 64 65 73 20 61 64 64 6f |ch inclu|des addo|
|00003110| 6e 2e 68 20 61 6e 64 20 | 74 68 65 0a 6f 6e 6c 79 |n.h and |the.only|
|00003120| 20 6d 6f 64 75 6c 65 20 | 69 6e 20 77 68 69 63 68 | module |in which|
|00003130| 20 74 68 65 20 5f 62 5f | 3c 62 75 69 6c 74 69 6e | the _b_|<builtin|
|00003140| 3e 20 73 79 6d 62 6f 6c | 20 69 73 20 72 65 66 65 |> symbol| is refe|
|00003150| 72 65 6e 63 65 64 2c 20 | 73 6f 20 72 65 2d 6d 61 |renced, |so re-ma|
|00003160| 6b 65 73 20 61 72 65 20 | 66 61 73 74 2e 0a 0a 54 |kes are |fast...T|
|00003170| 6f 20 72 65 6d 6f 76 65 | 20 2a 61 6c 6c 2a 20 74 |o remove| *all* t|
|00003180| 68 65 20 61 64 64 65 64 | 20 62 75 69 6c 74 69 6e |he added| builtin|
|00003190| 73 2c 20 75 6e 63 6f 6d | 6d 65 6e 74 20 6f 75 74 |s, uncom|ment out|
|000031a0| 20 74 68 65 20 27 2d 44 | 41 44 44 4f 4e 27 20 69 | the '-D|ADDON' i|
|000031b0| 6e 20 74 68 65 0a 43 46 | 4c 41 47 53 20 69 6e 20 |n the.CF|LAGS in |
|000031c0| 74 68 65 20 4d 61 6b 65 | 66 69 6c 65 2c 20 72 6d |the Make|file, rm|
|000031d0| 20 62 75 69 6c 74 69 6e | 2e 6f 2c 20 61 6e 64 20 | builtin|.o, and |
|000031e0| 27 6d 61 6b 65 27 2e 0a | 0a 49 66 20 79 6f 75 20 |'make'..|.If you |
|000031f0| 77 61 6e 74 20 74 6f 20 | 63 72 65 61 74 65 20 79 |want to |create y|
|00003200| 6f 75 72 20 6f 77 6e 20 | 62 75 69 6c 74 69 6e 73 |our own |builtins|
|00003210| 2c 20 69 74 27 73 20 2a | 72 65 61 6c 6c 79 2a 20 |, it's *|really* |
|00003220| 65 61 73 79 2e 20 20 54 | 68 65 79 20 68 61 76 65 |easy. T|hey have|
|00003230| 20 74 68 65 0a 66 6f 72 | 6d 3a 0a 0a 76 6f 69 64 | the.for|m:..void|
|00003240| 20 62 5f 66 6f 6f 28 63 | 68 61 72 2a 20 61 72 67 | b_foo(c|har* arg|
|00003250| 76 5b 5d 29 20 7b 0a 20 | 20 20 20 2e 2e 2e 0a 20 |v[]) {. | .... |
|00003260| 20 20 20 73 65 74 28 54 | 52 55 45 29 20 6f 72 20 | set(T|RUE) or |
|00003270| 73 65 74 28 46 41 4c 53 | 45 29 20 28 64 65 70 65 |set(FALS|E) (depe|
|00003280| 6e 64 69 6e 67 20 6f 6e | 20 77 68 61 74 20 79 6f |nding on| what yo|
|00003290| 75 20 77 61 6e 74 20 74 | 68 65 20 65 78 69 74 20 |u want t|he exit |
|000032a0| 73 74 61 74 75 73 20 74 | 6f 20 62 65 29 0a 7d 0a |status t|o be).}.|
|000032b0| 0a 49 20 74 72 69 65 64 | 20 74 6f 20 61 64 64 20 |.I tried| to add |
|000032c0| 61 6c 6c 20 6f 66 20 74 | 68 65 20 66 75 6e 63 74 |all of t|he funct|
|000032d0| 69 6f 6e 73 20 74 68 61 | 74 20 6d 6f 73 74 20 73 |ions tha|t most s|
|000032e0| 68 65 6c 6c 73 20 73 65 | 65 6d 20 74 6f 20 68 61 |hells se|em to ha|
|000032f0| 76 65 20 62 75 69 6c 74 | 69 6e 0a 6e 6f 77 61 64 |ve built|in.nowad|
|00003300| 61 79 73 20 61 6e 64 20 | 74 68 65 20 62 69 6e 61 |ays and |the bina|
|00003310| 72 79 20 69 73 20 73 74 | 69 6c 6c 20 75 6e 64 65 |ry is st|ill unde|
|00003320| 72 20 36 34 4b 2e 20 20 | 49 20 72 65 61 6c 69 7a |r 64K. |I realiz|
|00003330| 65 20 74 68 61 74 20 74 | 68 69 73 20 69 73 20 62 |e that t|his is b|
|00003340| 61 73 69 63 61 6c 6c 79 | 0a 69 6e 20 2a 64 69 72 |asically|.in *dir|
|00003350| 65 63 74 2a 20 6f 70 70 | 6f 73 69 74 69 6f 6e 20 |ect* opp|osition |
|00003360| 74 6f 20 74 68 65 20 77 | 68 6f 6c 65 20 27 72 63 |to the w|hole 'rc|
|00003370| 27 20 70 68 69 6c 6f 73 | 6f 70 68 79 20 28 72 65 |' philos|ophy (re|
|00003380| 6c 69 67 69 6f 6e 3f 29 | 2c 20 62 75 74 0a 77 68 |ligion?)|, but.wh|
|00003390| 61 74 20 74 68 65 20 68 | 65 79 2c 20 49 20 6c 69 |at the h|ey, I li|
|000033a0| 6b 65 20 74 68 65 20 27 | 72 63 27 20 73 79 6e 74 |ke the '|rc' synt|
|000033b0| 61 78 20 61 6e 64 20 71 | 75 6f 74 69 6e 67 20 72 |ax and q|uoting r|
|000033c0| 75 6c 65 73 2e 20 20 49 | 20 61 6c 77 61 79 73 20 |ules. I| always |
|000033d0| 74 68 6f 75 67 68 74 0a | 74 68 65 20 27 72 63 27 |thought.|the 'rc'|
|000033e0| 20 70 68 69 6c 6f 73 6f | 70 68 79 20 68 61 64 20 | philoso|phy had |
|000033f0| 74 77 6f 20 6d 61 6a 6f | 72 20 63 6f 6d 70 6f 6e |two majo|r compon|
|00003400| 65 6e 74 73 3a 20 6d 69 | 6e 69 6d 61 6c 20 73 79 |ents: mi|nimal sy|
|00003410| 6e 74 61 78 20 61 6e 64 | 20 6d 69 6e 69 6d 61 6c |ntax and| minimal|
|00003420| 0a 62 75 69 6c 74 69 6e | 73 2e 20 20 49 20 61 67 |.builtin|s. I ag|
|00003430| 72 65 65 20 77 69 74 68 | 20 74 68 65 20 66 6f 72 |ree with| the for|
|00003440| 6d 65 72 20 77 68 69 6c | 65 20 74 68 69 6e 6b 69 |mer whil|e thinki|
|00003450| 6e 67 20 74 68 65 20 6c | 61 74 74 65 72 20 69 73 |ng the l|atter is|
|00003460| 20 61 74 20 6f 64 64 73 | 0a 77 69 74 68 20 73 69 | at odds|.with si|
|00003470| 67 6e 69 66 69 63 61 6e | 74 20 70 65 72 66 6f 72 |gnifican|t perfor|
|00003480| 6d 61 6e 63 65 20 61 6e | 64 20 70 6f 72 74 61 62 |mance an|d portab|
|00003490| 69 6c 69 74 79 20 69 73 | 73 75 65 73 20 69 6e 20 |ility is|sues in |
|000034a0| 73 68 65 6c 6c 20 73 63 | 72 69 70 74 20 70 72 6f |shell sc|ript pro|
|000034b0| 67 72 61 6d 6d 69 6e 67 | 2e 0a 4e 6f 20 6d 61 74 |gramming|..No mat|
|000034c0| 74 65 72 20 77 68 61 74 | 20 68 61 70 70 65 6e 73 |ter what| happens|
|000034d0| 20 77 69 74 68 20 50 4f | 53 49 58 20 61 6e 64 20 | with PO|SIX and |
|000034e0| 61 6c 6c 2c 20 79 6f 75 | 20 63 61 6e 20 6a 75 73 |all, you| can jus|
|000034f0| 74 20 62 65 74 20 74 68 | 61 74 20 73 6f 6d 65 20 |t bet th|at some |
|00003500| 6f 66 20 74 68 65 0a 73 | 65 6d 61 6e 74 69 63 73 |of the.s|emantics|
|00003510| 20 6f 66 20 74 68 69 6e | 67 73 20 6c 69 6b 65 20 | of thin|gs like |
|00003520| 67 65 74 6f 70 74 2c 20 | 74 65 73 74 2c 20 65 78 |getopt, |test, ex|
|00003530| 70 72 2c 20 65 74 63 2e | 20 61 72 65 20 67 6f 69 |pr, etc.| are goi|
|00003540| 6e 67 20 74 6f 20 62 65 | 20 64 69 66 66 65 72 65 |ng to be| differe|
|00003550| 6e 74 20 6f 6e 0a 64 69 | 66 66 65 72 65 6e 74 20 |nt on.di|fferent |
|00003560| 75 6e 69 63 65 73 2e 20 | 20 48 61 76 69 6e 67 20 |unices. | Having |
|00003570| 61 20 2a 63 6f 72 65 2a | 20 73 65 74 20 6f 66 20 |a *core*| set of |
|00003580| 2a 73 69 6d 70 6c 65 2a | 20 6f 6e 65 27 73 20 69 |*simple*| one's i|
|00003590| 6e 20 74 68 65 20 73 68 | 65 6c 6c 20 69 73 20 2a |n the sh|ell is *|
|000035a0| 6e 6f 74 2a 0a 61 6e 20 | 69 6e 68 65 72 65 6e 74 |not*.an |inherent|
|000035b0| 6c 79 20 65 76 69 6c 20 | 69 64 65 61 2e 0a 0a 49 |ly evil |idea...I|
|000035c0| 6e 20 61 6e 79 20 63 61 | 73 65 2c 20 49 20 64 6f |n any ca|se, I do|
|000035d0| 6e 27 74 20 77 61 6e 74 | 20 74 6f 20 68 65 61 72 |n't want| to hear|
|000035e0| 20 61 6e 79 20 66 6c 61 | 63 6b 20 74 68 61 74 20 | any fla|ck that |
|000035f0| 67 6f 65 73 20 6c 69 6b | 65 20 27 48 6f 77 20 63 |goes lik|e 'How c|
|00003600| 6f 75 6c 64 20 79 6f 75 | 0a 50 4f 53 53 49 42 4c |ould you|.POSSIBL|
|00003610| 59 20 61 64 64 20 61 6c | 6c 20 74 68 6f 73 65 20 |Y add al|l those |
|00003620| 62 75 69 6c 74 69 6e 73 | 20 74 6f 20 72 63 3f 3f |builtins| to rc??|
|00003630| 3f 21 21 21 27 2e 20 20 | 49 66 20 79 6f 75 20 64 |?!!!'. |If you d|
|00003640| 6f 6e 27 74 20 6c 69 6b | 65 20 27 65 6d 2c 0a 75 |on't lik|e 'em,.u|
|00003650| 6e 64 65 66 69 6e 65 20 | 41 44 44 4f 4e 20 61 6e |ndefine |ADDON an|
|00003660| 64 20 72 65 63 6f 6d 70 | 69 6c 65 2e 20 20 49 20 |d recomp|ile. I |
|00003670| 69 6e 63 6c 75 64 65 64 | 20 74 68 65 6d 20 62 65 |included| them be|
|00003680| 63 61 75 73 65 20 49 20 | 74 68 69 6e 6b 20 61 20 |cause I |think a |
|00003690| 6c 6f 74 20 6f 66 20 70 | 65 6f 70 6c 65 0a 77 69 |lot of p|eople.wi|
|000036a0| 6c 6c 20 66 69 6e 64 20 | 74 68 65 6d 20 69 63 69 |ll find |them ici|
|000036b0| 6e 67 20 6f 6e 20 61 20 | 77 65 6c 6c 20 64 65 73 |ng on a |well des|
|000036c0| 69 67 6e 65 64 20 73 68 | 65 6c 6c 2c 20 70 65 72 |igned sh|ell, per|
|000036d0| 68 61 70 73 20 65 6e 6f | 75 67 68 20 74 6f 20 63 |haps eno|ugh to c|
|000036e0| 68 61 6e 67 65 20 6f 76 | 65 72 2e 0a 0a 43 68 61 |hange ov|er...Cha|
|000036f0| 72 6c 65 73 20 42 6c 61 | 6b 65 0a 4a 75 6c 79 20 |rles Bla|ke.July |
|00003700| 32 37 2c 20 31 39 39 34 | 0a 0a 0a 42 61 63 6b 75 |27, 1994|...Backu|
|00003710| 70 73 20 6f 66 20 4c 69 | 6e 75 78 20 73 70 65 63 |ps of Li|nux spec|
|00003720| 69 66 69 63 20 66 69 6c | 65 73 2e 20 20 45 78 74 |ific fil|es. Ext|
|00003730| 72 61 63 74 20 74 68 65 | 73 65 20 74 6f 20 74 68 |ract the|se to th|
|00003740| 65 20 66 69 6c 65 6e 61 | 6d 65 73 20 69 6e 64 69 |e filena|mes indi|
|00003750| 63 61 74 65 64 20 69 66 | 0a 66 6f 72 20 73 6f 6d |cated if|.for som|
|00003760| 65 20 72 65 61 73 6f 6e | 2c 20 74 68 65 79 20 67 |e reason|, they g|
|00003770| 65 74 20 63 6c 6f 62 62 | 65 72 65 64 2f 74 72 61 |et clobb|ered/tra|
|00003780| 73 68 65 64 2e 0a 0a 2d | 2d 2d 2d 2d 2d 2d 20 73 |shed...-|------ s|
|00003790| 69 67 6d 73 67 73 2e 63 | 20 2d 2d 2d 2d 2d 2d 2d |igmsgs.c| -------|
|000037a0| 2d 2d 2d 0a 23 69 6e 63 | 6c 75 64 65 20 22 73 69 |---.#inc|lude "si|
|000037b0| 67 6d 73 67 73 2e 68 22 | 0a 0a 53 69 67 6d 73 67 |gmsgs.h"|..Sigmsg|
|000037c0| 73 20 73 69 67 6e 61 6c | 73 5b 5d 20 3d 20 7b 0a |s signal|s[] = {.|
|000037d0| 09 7b 22 22 2c 22 22 7d | 2c 0a 09 7b 22 73 69 67 |.{"",""}|,..{"sig|
|000037e0| 68 75 70 22 2c 22 68 61 | 6e 67 75 70 22 7d 2c 0a |hup","ha|ngup"},.|
|000037f0| 09 7b 22 73 69 67 69 6e | 74 22 2c 22 22 7d 2c 0a |.{"sigin|t",""},.|
|00003800| 09 7b 22 73 69 67 71 75 | 69 74 22 2c 22 71 75 69 |.{"sigqu|it","qui|
|00003810| 74 22 7d 2c 0a 09 7b 22 | 73 69 67 69 6c 6c 22 2c |t"},..{"|sigill",|
|00003820| 22 69 6c 6c 65 67 61 6c | 20 69 6e 73 74 72 75 63 |"illegal| instruc|
|00003830| 74 69 6f 6e 22 7d 2c 0a | 09 7b 22 73 69 67 74 72 |tion"},.|.{"sigtr|
|00003840| 61 70 22 2c 22 74 72 61 | 63 65 20 74 72 61 70 22 |ap","tra|ce trap"|
|00003850| 7d 2c 0a 09 7b 22 73 69 | 67 61 62 72 74 22 2c 22 |},..{"si|gabrt","|
|00003860| 61 62 6f 72 74 20 69 6e | 73 74 72 75 63 74 69 6f |abort in|structio|
|00003870| 6e 22 7d 2c 0a 09 7b 22 | 73 69 67 75 6e 75 73 65 |n"},..{"|sigunuse|
|00003880| 64 22 2c 22 75 6e 75 73 | 65 64 20 73 69 67 6e 61 |d","unus|ed signa|
|00003890| 6c 22 7d 2c 0a 09 7b 22 | 73 69 67 66 70 65 22 2c |l"},..{"|sigfpe",|
|000038a0| 22 66 6c 6f 61 74 69 6e | 67 20 70 6f 69 6e 74 20 |"floatin|g point |
|000038b0| 65 78 63 65 70 74 69 6f | 6e 22 7d 2c 0a 09 7b 22 |exceptio|n"},..{"|
|000038c0| 73 69 67 6b 69 6c 6c 22 | 2c 22 6b 69 6c 6c 65 64 |sigkill"|,"killed|
|000038d0| 22 7d 2c 0a 09 7b 22 73 | 69 67 75 73 72 31 22 2c |"},..{"s|igusr1",|
|000038e0| 22 75 73 65 72 20 64 65 | 66 69 6e 65 64 20 73 69 |"user de|fined si|
|000038f0| 67 6e 61 6c 20 31 22 7d | 2c 0a 09 7b 22 73 69 67 |gnal 1"}|,..{"sig|
|00003900| 73 65 67 76 22 2c 22 73 | 65 67 6d 65 6e 74 61 74 |segv","s|egmentat|
|00003910| 69 6f 6e 20 76 69 6f 6c | 61 74 69 6f 6e 22 7d 2c |ion viol|ation"},|
|00003920| 0a 09 7b 22 73 69 67 75 | 73 72 32 22 2c 22 75 73 |..{"sigu|sr2","us|
|00003930| 65 72 20 64 65 66 69 6e | 65 64 20 73 69 67 6e 61 |er defin|ed signa|
|00003940| 6c 20 32 22 7d 2c 0a 09 | 7b 22 73 69 67 70 69 70 |l 2"},..|{"sigpip|
|00003950| 65 22 2c 22 22 7d 2c 0a | 09 7b 22 73 69 67 61 6c |e",""},.|.{"sigal|
|00003960| 72 6d 22 2c 22 61 6c 61 | 72 6d 20 63 6c 6f 63 6b |rm","ala|rm clock|
|00003970| 22 7d 2c 0a 09 7b 22 73 | 69 67 74 65 72 6d 22 2c |"},..{"s|igterm",|
|00003980| 22 74 65 72 6d 69 6e 61 | 74 65 64 22 7d 2c 0a 09 |"termina|ted"},..|
|00003990| 7b 22 73 69 67 73 74 6b | 66 6c 74 22 2c 22 73 74 |{"sigstk|flt","st|
|000039a0| 61 63 6b 20 66 61 75 6c | 74 22 7d 2c 0a 09 7b 22 |ack faul|t"},..{"|
|000039b0| 73 69 67 63 68 6c 64 22 | 2c 22 63 68 69 6c 64 20 |sigchld"|,"child |
|000039c0| 73 74 6f 70 20 6f 72 20 | 65 78 69 74 22 7d 2c 0a |stop or |exit"},.|
|000039d0| 09 7b 22 73 69 67 63 6f | 6e 74 22 2c 22 63 6f 6e |.{"sigco|nt","con|
|000039e0| 74 69 6e 75 65 22 7d 2c | 0a 09 7b 22 73 69 67 74 |tinue"},|..{"sigt|
|000039f0| 73 74 6f 70 22 2c 22 73 | 74 6f 70 70 65 64 22 7d |stop","s|topped"}|
|00003a00| 2c 0a 09 7b 22 73 69 67 | 73 74 70 22 2c 22 73 74 |,..{"sig|stp","st|
|00003a10| 6f 70 70 65 64 22 7d 2c | 0a 09 7b 22 73 69 67 74 |opped"},|..{"sigt|
|00003a20| 74 69 6e 22 2c 22 62 61 | 63 6b 67 72 6f 75 6e 64 |tin","ba|ckground|
|00003a30| 20 74 74 79 20 72 65 61 | 64 22 7d 2c 0a 09 7b 22 | tty rea|d"},..{"|
|00003a40| 73 69 67 74 74 6f 75 22 | 2c 22 62 61 63 6b 67 72 |sigttou"|,"backgr|
|00003a50| 6f 75 6e 64 20 74 74 79 | 20 77 72 69 74 65 22 7d |ound tty| write"}|
|00003a60| 2c 0a 09 7b 22 73 69 67 | 69 6f 22 2c 22 69 6e 70 |,..{"sig|io","inp|
|00003a70| 75 74 2f 6f 75 74 70 75 | 74 20 70 6f 73 73 69 62 |ut/outpu|t possib|
|00003a80| 6c 65 22 7d 2c 0a 09 7b | 22 73 69 67 78 63 70 75 |le"},..{|"sigxcpu|
|00003a90| 22 2c 22 65 78 63 65 65 | 64 65 64 20 63 70 75 20 |","excee|ded cpu |
|00003aa0| 74 69 6d 65 20 6c 69 6d | 69 74 22 7d 2c 0a 09 7b |time lim|it"},..{|
|00003ab0| 22 73 69 67 78 66 73 7a | 22 2c 22 65 78 63 65 65 |"sigxfsz|","excee|
|00003ac0| 64 65 64 20 66 69 6c 65 | 20 73 69 7a 65 20 6c 69 |ded file| size li|
|00003ad0| 6d 69 74 22 7d 2c 0a 09 | 7b 22 73 69 67 76 74 61 |mit"},..|{"sigvta|
|00003ae0| 6c 72 6d 22 2c 22 76 69 | 72 74 75 61 6c 20 74 69 |lrm","vi|rtual ti|
|00003af0| 6d 65 20 61 6c 61 72 6d | 22 7d 2c 0a 09 7b 22 73 |me alarm|"},..{"s|
|00003b00| 69 67 70 72 6f 66 22 2c | 22 70 72 6f 66 69 6c 69 |igprof",|"profili|
|00003b10| 6e 67 20 74 69 6d 65 20 | 61 6c 61 72 6d 22 7d 2c |ng time |alarm"},|
|00003b20| 0a 09 7b 22 73 69 67 77 | 69 6e 63 68 22 2c 22 77 |..{"sigw|inch","w|
|00003b30| 69 6e 64 6f 77 20 63 68 | 61 6e 67 65 64 22 7d 0a |indow ch|anged"}.|
|00003b40| 7d 3b 0a 0a 2d 2d 2d 2d | 2d 2d 20 73 69 67 6d 73 |};..----|-- sigms|
|00003b50| 67 73 2e 68 20 2d 2d 2d | 2d 2d 2d 0a 0a 74 79 70 |gs.h ---|---..typ|
|00003b60| 65 64 65 66 20 73 74 72 | 75 63 74 20 7b 0a 09 63 |edef str|uct {..c|
|00003b70| 68 61 72 20 2a 6e 61 6d | 65 2c 20 2a 6d 73 67 3b |har *nam|e, *msg;|
|00003b80| 0a 7d 20 53 69 67 6d 73 | 67 73 3b 0a 65 78 74 65 |.} Sigms|gs;.exte|
|00003b90| 72 6e 20 53 69 67 6d 73 | 67 73 20 73 69 67 6e 61 |rn Sigms|gs signa|
|00003ba0| 6c 73 5b 5d 3b 0a 23 64 | 65 66 69 6e 65 20 4e 55 |ls[];.#d|efine NU|
|00003bb0| 4d 4f 46 53 49 47 4e 41 | 4c 53 20 32 39 0a 00 00 |MOFSIGNA|LS 29...|
|00003bc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003bd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003be0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003bf0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003c00| 72 63 2d 31 2e 35 2d 6c | 69 6e 75 78 2f 63 6f 6e |rc-1.5-l|inux/con|
|00003c10| 66 69 67 2e 68 00 00 00 | 00 00 00 00 00 00 00 00 |fig.h...|........|
|00003c20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003c30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003c40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003c50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003c60| 00 00 00 00 31 30 30 36 | 30 30 20 00 20 20 20 36 |....1006|00 . 6|
|00003c70| 32 35 20 00 20 20 20 20 | 20 31 20 00 20 20 20 20 |25 . | 1 . |
|00003c80| 20 20 31 31 37 37 34 20 | 20 35 36 31 36 30 32 31 | 11774 | 5616021|
|00003c90| 36 31 32 20 20 31 32 34 | 35 33 00 20 30 00 00 00 |612 124|53. 0...|
|00003ca0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003cb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003cc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003cd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003ce0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003cf0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003d00| 00 75 73 74 61 72 20 20 | 00 63 62 00 00 00 00 00 |.ustar |.cb.....|
|00003d10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003d20| 00 00 00 00 00 00 00 00 | 00 6f 74 68 65 72 00 00 |........|.other..|
|00003d30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003d40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003d50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003d60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003d70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003d80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003d90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003da0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003db0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003dc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003dd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003de0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003df0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003e00| 2f 2a 20 43 6f 70 79 20 | 63 6f 6e 66 69 67 2e 68 |/* Copy |config.h|
|00003e10| 2d 64 69 73 74 20 74 6f | 20 63 6f 6e 66 69 67 2e |-dist to| config.|
|00003e20| 68 20 61 6e 64 20 65 64 | 69 74 20 63 6f 6e 66 69 |h and ed|it confi|
|00003e30| 67 2e 68 2c 20 64 6f 6e | 27 74 20 65 64 69 74 20 |g.h, don|'t edit |
|00003e40| 74 68 69 73 20 66 69 6c | 65 20 2a 2f 0a 0a 2f 2a |this fil|e */../*|
|00003e50| 0a 20 2a 20 43 6f 6e 66 | 69 67 75 72 61 74 69 6f |. * Conf|iguratio|
|00003e60| 6e 20 70 61 72 61 6d 65 | 74 65 72 73 20 66 6f 72 |n parame|ters for|
|00003e70| 20 72 63 2e 20 53 75 67 | 67 65 73 74 65 64 20 64 | rc. Sug|gested d|
|00003e80| 65 66 61 75 6c 74 73 20 | 61 72 65 20 61 74 20 74 |efaults |are at t|
|00003e90| 68 65 20 62 6f 74 74 6f | 6d 0a 20 2a 20 6f 66 20 |he botto|m. * of |
|00003ea0| 74 68 69 73 20 66 69 6c | 65 20 28 79 6f 75 20 73 |this fil|e (you s|
|00003eb0| 68 6f 75 6c 64 20 70 72 | 6f 62 61 62 6c 79 20 6c |hould pr|obably l|
|00003ec0| 6f 6f 6b 20 61 74 20 74 | 68 6f 73 65 20 66 69 72 |ook at t|hose fir|
|00003ed0| 73 74 20 74 6f 20 73 65 | 65 20 69 66 20 79 6f 75 |st to se|e if you|
|00003ee0| 72 0a 20 2a 20 73 79 73 | 74 65 6d 20 6d 61 74 63 |r. * sys|tem matc|
|00003ef0| 68 65 73 20 6f 6e 65 20 | 6f 66 20 74 68 65 6d 3b |hes one |of them;|
|00003f00| 20 79 6f 75 20 63 61 6e | 20 73 65 61 72 63 68 20 | you can| search |
|00003f10| 66 6f 72 20 74 68 65 20 | 62 65 67 69 6e 6e 69 6e |for the |beginnin|
|00003f20| 67 20 6f 66 20 74 68 65 | 0a 20 2a 20 64 65 66 61 |g of the|. * defa|
|00003f30| 75 6c 74 73 20 73 65 63 | 74 69 6f 6e 20 62 79 20 |ults sec|tion by |
|00003f40| 6c 6f 6f 6b 69 6e 67 20 | 66 6f 72 20 74 68 65 20 |looking |for the |
|00003f50| 73 74 72 69 6e 67 20 22 | 23 69 66 6e 64 65 66 20 |string "|#ifndef |
|00003f60| 43 55 53 54 4f 4d 22 29 | 2e 20 49 66 20 79 6f 75 |CUSTOM")|. If you|
|00003f70| 0a 20 2a 20 77 61 6e 74 | 20 74 6f 20 6f 76 65 72 |. * want| to over|
|00003f80| 72 69 64 65 20 74 68 65 | 20 73 75 67 67 65 73 74 |ride the| suggest|
|00003f90| 65 64 20 64 65 66 61 75 | 6c 74 73 2c 20 64 65 66 |ed defau|lts, def|
|00003fa0| 69 6e 65 20 74 68 65 20 | 6d 61 63 72 6f 20 43 55 |ine the |macro CU|
|00003fb0| 53 54 4f 4d 2e 0a 23 64 | 65 66 69 6e 65 20 43 55 |STOM..#d|efine CU|
|00003fc0| 53 54 4f 4d 0a 20 2a 2f | 0a 0a 2f 2a 0a 20 2a 20 |STOM. */|../*. * |
|00003fd0| 28 4e 6f 74 65 20 74 68 | 61 74 20 63 65 72 74 61 |(Note th|at certa|
|00003fe0| 69 6e 20 64 65 66 61 75 | 6c 74 20 73 65 74 74 69 |in defau|lt setti|
|00003ff0| 6e 67 73 20 72 65 64 65 | 66 69 6e 65 20 74 68 69 |ngs rede|fine thi|
|00004000| 73 20 6d 61 63 72 6f 29 | 0a 20 2a 20 44 45 46 41 |s macro)|. * DEFA|
|00004010| 55 4c 54 50 41 54 48 20 | 74 68 65 20 64 65 66 61 |ULTPATH |the defa|
|00004020| 75 6c 74 20 73 65 61 72 | 63 68 20 70 61 74 68 20 |ult sear|ch path |
|00004030| 74 68 61 74 20 72 63 20 | 75 73 65 73 20 77 68 65 |that rc |uses whe|
|00004040| 6e 20 69 74 20 69 73 20 | 73 74 61 72 74 65 64 0a |n it is |started.|
|00004050| 20 2a 20 77 69 74 68 6f | 75 74 20 65 69 74 68 65 | * witho|ut eithe|
|00004060| 72 20 61 20 24 50 41 54 | 48 20 6f 72 20 24 70 61 |r a $PAT|H or $pa|
|00004070| 74 68 20 65 6e 76 69 72 | 6f 6e 6d 65 6e 74 20 76 |th envir|onment v|
|00004080| 61 72 69 61 62 6c 65 2e | 20 59 6f 75 20 6d 75 73 |ariable.| You mus|
|00004090| 74 20 70 69 63 6b 0a 20 | 2a 20 73 6f 6d 65 74 68 |t pick. |* someth|
|000040a0| 69 6e 67 20 73 65 6e 73 | 69 62 6c 65 20 66 6f 72 |ing sens|ible for|
|000040b0| 20 79 6f 75 72 20 73 79 | 73 74 65 6d 20 69 66 20 | your sy|stem if |
|000040c0| 79 6f 75 20 64 6f 6e 27 | 74 20 6c 69 6b 65 20 74 |you don'|t like t|
|000040d0| 68 65 20 70 61 74 68 20 | 73 68 6f 77 6e 0a 20 2a |he path |shown. *|
|000040e0| 20 62 65 6c 6f 77 2e 0a | 20 2a 2f 0a 23 64 65 66 | below..| */.#def|
|000040f0| 69 6e 65 20 44 45 46 41 | 55 4c 54 50 41 54 48 20 |ine DEFA|ULTPATH |
|00004100| 22 2f 75 73 72 2f 6c 6f | 63 61 6c 2f 62 69 6e 22 |"/usr/lo|cal/bin"|
|00004110| 2c 20 22 2f 75 73 72 2f | 62 69 6e 22 2c 20 22 2f |, "/usr/|bin", "/|
|00004120| 62 69 6e 22 2c 20 22 2f | 75 73 72 2f 58 33 38 36 |bin", "/|usr/X386|
|00004130| 2f 62 69 6e 22 2c 20 22 | 2f 75 73 72 2f 54 65 58 |/bin", "|/usr/TeX|
|00004140| 2f 62 69 6e 22 0a 0a 2f | 2a 0a 20 2a 20 44 65 66 |/bin"../|*. * Def|
|00004150| 69 6e 65 20 74 68 65 20 | 6d 61 63 72 6f 20 4e 4f |ine the |macro NO|
|00004160| 44 49 52 45 4e 54 20 69 | 66 20 79 6f 75 72 20 73 |DIRENT i|f your s|
|00004170| 79 73 74 65 6d 20 68 61 | 73 20 3c 73 79 73 2f 64 |ystem ha|s <sys/d|
|00004180| 69 72 2e 68 3e 20 62 75 | 74 20 6e 6f 74 0a 20 2a |ir.h> bu|t not. *|
|00004190| 20 3c 64 69 72 65 6e 74 | 2e 68 3e 2e 20 28 65 2e | <dirent|.h>. (e.|
|000041a0| 67 2e 2c 20 4e 65 58 54 | 2d 4f 53 20 61 6e 64 20 |g., NeXT|-OS and |
|000041b0| 52 49 53 43 6f 73 29 0a | 23 64 65 66 69 6e 65 20 |RISCos).|#define |
|000041c0| 4e 4f 44 49 52 45 4e 54 | 0a 20 2a 2f 0a 0a 2f 2a |NODIRENT|. */../*|
|000041d0| 0a 20 2a 20 44 65 66 69 | 6e 65 20 74 68 65 20 6d |. * Defi|ne the m|
|000041e0| 61 63 72 6f 20 53 56 53 | 49 47 53 20 69 66 20 79 |acro SVS|IGS if y|
|000041f0| 6f 75 72 20 73 79 73 74 | 65 6d 20 68 61 73 20 53 |our syst|em has S|
|00004200| 79 73 74 65 6d 20 56 20 | 73 69 67 6e 61 6c 20 73 |ystem V |signal s|
|00004210| 65 6d 61 6e 74 69 63 73 | 2c 0a 20 2a 20 69 2e 65 |emantics|,. * i.e|
|00004220| 2e 2c 20 69 66 20 22 73 | 6c 6f 77 22 20 73 79 73 |., if "s|low" sys|
|00004230| 74 65 6d 20 63 61 6c 6c | 73 20 61 72 65 20 69 6e |tem call|s are in|
|00004240| 74 65 72 72 75 70 74 65 | 64 20 72 61 74 68 65 72 |terrupte|d rather|
|00004250| 20 74 68 61 6e 20 72 65 | 73 75 6d 65 64 0a 20 2a | than re|sumed. *|
|00004260| 20 61 66 74 65 72 20 72 | 65 74 75 72 6e 69 6e 67 | after r|eturning|
|00004270| 20 66 72 6f 6d 20 61 6e | 20 69 6e 74 65 72 72 75 | from an| interru|
|00004280| 70 74 20 68 61 6e 64 6c | 65 72 2e 20 28 49 66 20 |pt handl|er. (If |
|00004290| 79 6f 75 20 61 72 65 20 | 6e 6f 74 20 73 75 72 65 |you are |not sure|
|000042a0| 20 77 68 61 74 0a 20 2a | 20 74 68 69 73 20 6d 65 | what. *| this me|
|000042b0| 61 6e 73 2c 20 73 65 65 | 20 74 68 65 20 6d 61 6e |ans, see| the man|
|000042c0| 20 70 61 67 65 20 66 6f | 72 20 73 69 67 6e 61 6c | page fo|r signal|
|000042d0| 28 32 29 2e 20 49 6e 20 | 61 6e 79 20 63 61 73 65 |(2). In |any case|
|000042e0| 2c 20 69 74 20 69 73 20 | 70 72 6f 62 61 62 6c 79 |, it is |probably|
|000042f0| 0a 20 2a 20 73 61 66 65 | 20 74 6f 20 6c 65 61 76 |. * safe| to leav|
|00004300| 65 20 74 68 69 73 20 6d | 61 63 72 6f 20 75 6e 64 |e this m|acro und|
|00004310| 65 66 69 6e 65 64 2e 29 | 0a 23 64 65 66 69 6e 65 |efined.)|.#define|
|00004320| 20 53 56 53 49 47 53 0a | 20 2a 2f 0a 0a 2f 2a 0a | SVSIGS.| */../*.|
|00004330| 20 2a 20 44 65 66 69 6e | 65 20 74 68 65 20 6d 61 | * Defin|e the ma|
|00004340| 63 72 6f 20 4e 4f 43 4d | 44 41 52 47 20 69 66 20 |cro NOCM|DARG if |
|00004350| 79 6f 75 20 64 6f 20 6e | 6f 74 20 68 61 76 65 20 |you do n|ot have |
|00004360| 2f 64 65 76 2f 66 64 20 | 6f 72 20 66 69 66 6f 73 |/dev/fd |or fifos|
|00004370| 20 6f 6e 20 79 6f 75 72 | 0a 20 2a 20 73 79 73 74 | on your|. * syst|
|00004380| 65 6d 2e 20 59 6f 75 20 | 6d 61 79 20 61 6c 73 6f |em. You |may also|
|00004390| 20 77 61 6e 74 20 74 6f | 20 64 65 66 69 6e 65 20 | want to| define |
|000043a0| 74 68 69 73 20 69 66 20 | 79 6f 75 20 68 61 76 65 |this if |you have|
|000043b0| 20 62 72 6f 6b 65 6e 20 | 66 69 66 6f 73 2e 0a 23 | broken |fifos..#|
|000043c0| 64 65 66 69 6e 65 20 4e | 4f 43 4d 44 41 52 47 0a |define N|OCMDARG.|
|000043d0| 20 2a 2f 0a 0a 2f 2a 0a | 20 2a 20 44 65 66 69 6e | */../*.| * Defin|
|000043e0| 65 20 54 4d 50 44 49 52 | 20 69 66 20 79 6f 75 20 |e TMPDIR| if you |
|000043f0| 6e 65 65 64 20 74 6f 20 | 68 61 76 65 20 72 63 20 |need to |have rc |
|00004400| 63 72 65 61 74 65 20 69 | 74 73 20 66 69 66 6f 73 |create i|ts fifos|
|00004410| 20 69 6e 20 61 20 64 69 | 72 65 63 74 6f 72 79 0a | in a di|rectory.|
|00004420| 20 2a 20 6f 74 68 65 72 | 20 74 68 61 6e 20 2f 74 | * other| than /t|
|00004430| 6d 70 2e 20 46 6f 72 20 | 65 78 61 6d 70 6c 65 2c |mp. For |example,|
|00004440| 20 69 66 20 79 6f 75 20 | 68 61 76 65 20 61 20 53 | if you |have a S|
|00004450| 75 6e 20 77 69 74 68 20 | 2f 74 6d 70 20 6d 6f 75 |un with |/tmp mou|
|00004460| 6e 74 65 64 0a 20 2a 20 | 61 73 20 61 20 72 61 6d |nted. * |as a ram|
|00004470| 64 69 73 6b 20 28 74 79 | 70 65 20 22 74 6d 70 66 |disk (ty|pe "tmpf|
|00004480| 73 22 29 20 74 68 65 6e | 20 79 6f 75 20 63 61 6e |s") then| you can|
|00004490| 6e 6f 74 20 75 73 65 20 | 66 69 66 6f 73 20 69 6e |not use |fifos in|
|000044a0| 20 2f 74 6d 70 20 28 73 | 69 67 68 29 2e 0a 23 64 | /tmp (s|igh)..#d|
|000044b0| 65 66 69 6e 65 20 54 4d | 50 44 49 52 20 22 2f 76 |efine TM|PDIR "/v|
|000044c0| 61 72 2f 74 6d 70 22 0a | 20 2a 2f 0a 0a 2f 2a 0a |ar/tmp".| */../*.|
|000044d0| 20 2a 20 44 65 66 69 6e | 65 20 74 68 65 20 6d 61 | * Defin|e the ma|
|000044e0| 63 72 6f 20 44 45 56 46 | 44 20 69 66 20 79 6f 75 |cro DEVF|D if you|
|000044f0| 72 20 73 79 73 74 65 6d | 20 73 75 70 70 6f 72 74 |r system| support|
|00004500| 73 20 2f 64 65 76 2f 66 | 64 2e 0a 20 2a 2f 0a 23 |s /dev/f|d.. */.#|
|00004510| 64 65 66 69 6e 65 20 44 | 45 56 46 44 0a 0a 2f 2a |define D|EVFD../*|
|00004520| 0a 20 2a 20 44 65 66 69 | 6e 65 20 74 68 65 20 6d |. * Defi|ne the m|
|00004530| 61 63 72 6f 20 4e 4f 4c | 49 4d 49 54 53 20 69 66 |acro NOL|IMITS if|
|00004540| 20 79 6f 75 72 20 73 79 | 73 74 65 6d 20 64 6f 65 | your sy|stem doe|
|00004550| 73 20 6e 6f 74 20 73 75 | 70 70 6f 72 74 20 42 65 |s not su|pport Be|
|00004560| 72 6b 65 6c 65 79 0a 20 | 2a 20 6c 69 6d 69 74 73 |rkeley. |* limits|
|00004570| 2e 0a 23 64 65 66 69 6e | 65 20 4e 4f 4c 49 4d 49 |..#defin|e NOLIMI|
|00004580| 54 53 0a 20 2a 2f 0a 0a | 2f 2a 0a 20 2a 20 44 65 |TS. */..|/*. * De|
|00004590| 66 69 6e 65 20 74 68 65 | 20 6d 61 63 72 6f 20 4e |fine the| macro N|
|000045a0| 4f 53 49 47 43 4c 44 20 | 69 66 20 79 6f 75 72 20 |OSIGCLD |if your |
|000045b0| 73 79 73 74 65 6d 20 75 | 73 65 73 20 53 49 47 43 |system u|ses SIGC|
|000045c0| 4c 44 20 69 6e 20 74 68 | 65 20 53 79 73 74 65 6d |LD in th|e System|
|000045d0| 0a 20 2a 20 56 20 77 61 | 79 2e 20 28 65 2e 67 2e |. * V wa|y. (e.g.|
|000045e0| 2c 20 73 67 69 27 73 20 | 49 72 69 78 29 0a 23 64 |, sgi's |Irix).#d|
|000045f0| 65 66 69 6e 65 20 4e 4f | 53 49 47 43 4c 44 0a 20 |efine NO|SIGCLD. |
|00004600| 2a 2f 0a 0a 2f 2a 0a 20 | 2a 20 44 65 66 69 6e 65 |*/../*. |* Define|
|00004610| 20 74 68 65 20 6d 61 63 | 72 6f 20 52 45 41 44 4c | the mac|ro READL|
|00004620| 49 4e 45 20 69 66 20 79 | 6f 75 20 77 61 6e 74 20 |INE if y|ou want |
|00004630| 72 63 20 74 6f 20 63 61 | 6c 6c 20 47 4e 55 20 72 |rc to ca|ll GNU r|
|00004640| 65 61 64 6c 69 6e 65 0a | 20 2a 20 69 6e 73 74 65 |eadline.| * inste|
|00004650| 61 64 20 6f 66 20 72 65 | 61 64 28 32 29 20 6f 6e |ad of re|ad(2) on|
|00004660| 20 69 6e 74 65 72 61 63 | 74 69 76 65 20 73 68 65 | interac|tive she|
|00004670| 6c 6c 73 2e 0a 23 64 65 | 66 69 6e 65 20 52 45 41 |lls..#de|fine REA|
|00004680| 44 4c 49 4e 45 0a 20 2a | 2f 0a 0a 2f 2a 0a 20 2a |DLINE. *|/../*. *|
|00004690| 20 44 65 66 69 6e 65 20 | 74 68 65 20 6d 61 63 72 | Define |the macr|
|000046a0| 6f 20 4e 4f 45 58 45 43 | 56 45 20 69 66 20 79 6f |o NOEXEC|VE if yo|
|000046b0| 75 72 20 55 6e 69 78 20 | 64 6f 65 73 20 6e 6f 74 |ur Unix |does not|
|000046c0| 20 69 6e 74 65 72 70 72 | 65 74 20 23 21 20 69 6e | interpr|et #! in|
|000046d0| 20 74 68 65 0a 20 2a 20 | 6b 65 72 6e 65 6c 2c 20 | the. * |kernel, |
|000046e0| 61 6e 64 20 75 6e 63 6f | 6d 6d 65 6e 74 20 74 68 |and unco|mment th|
|000046f0| 65 20 45 58 45 43 56 45 | 20 76 61 72 69 61 62 6c |e EXECVE| variabl|
|00004700| 65 20 69 6e 20 74 68 65 | 20 4d 61 6b 65 66 69 6c |e in the| Makefil|
|00004710| 65 2e 0a 23 64 65 66 69 | 6e 65 20 4e 4f 45 58 45 |e..#defi|ne NOEXE|
|00004720| 43 56 45 0a 20 2a 2f 0a | 0a 2f 2a 0a 20 2a 20 49 |CVE. */.|./*. * I|
|00004730| 66 20 79 6f 75 20 77 61 | 6e 74 20 72 63 20 74 6f |f you wa|nt rc to|
|00004740| 20 64 65 66 61 75 6c 74 | 20 74 6f 20 73 6f 6d 65 | default| to some|
|00004750| 20 69 6e 74 65 72 70 72 | 65 74 65 72 20 66 6f 72 | interpr|eter for|
|00004760| 20 66 69 6c 65 73 20 77 | 68 69 63 68 20 64 6f 6e | files w|hich don|
|00004770| 27 74 0a 20 2a 20 68 61 | 76 65 20 61 20 6c 65 67 |'t. * ha|ve a leg|
|00004780| 61 6c 20 23 21 20 6f 6e | 20 74 68 65 20 66 69 72 |al #! on| the fir|
|00004790| 73 74 20 6c 69 6e 65 2c | 20 64 65 66 69 6e 65 20 |st line,| define |
|000047a0| 74 68 65 20 6d 61 63 72 | 6f 20 44 45 46 41 55 4c |the macr|o DEFAUL|
|000047b0| 54 49 4e 54 45 52 50 2e | 0a 20 2a 2f 0a 23 64 65 |TINTERP.|. */.#de|
|000047c0| 66 69 6e 65 20 44 45 46 | 41 55 4c 54 49 4e 54 45 |fine DEF|AULTINTE|
|000047d0| 52 50 20 22 2f 62 69 6e | 2f 73 68 22 0a 0a 2f 2a |RP "/bin|/sh"../*|
|000047e0| 0a 20 2a 20 49 66 20 79 | 6f 75 72 20 2f 62 69 6e |. * If y|our /bin|
|000047f0| 2f 73 68 20 28 6f 72 20 | 61 6e 6f 74 68 65 72 20 |/sh (or |another |
|00004800| 70 72 6f 67 72 61 6d 20 | 79 6f 75 20 63 61 72 65 |program |you care|
|00004810| 20 61 62 6f 75 74 29 20 | 72 65 6a 65 63 74 73 20 | about) |rejects |
|00004820| 65 6e 76 69 72 6f 6e 6d | 65 6e 74 0a 20 2a 20 76 |environm|ent. * v|
|00004830| 61 72 69 61 62 6c 65 73 | 20 77 69 74 68 20 73 70 |ariables| with sp|
|00004840| 65 63 69 61 6c 20 63 68 | 61 72 61 63 74 65 72 73 |ecial ch|aracters|
|00004850| 20 69 6e 20 74 68 65 6d | 20 28 73 75 63 68 20 61 | in them| (such a|
|00004860| 73 20 27 3a 27 20 6f 72 | 20 27 2d 27 29 2c 20 72 |s ':' or| '-'), r|
|00004870| 63 20 63 61 6e 0a 20 2a | 20 70 75 74 20 6f 75 74 |c can. *| put out|
|00004880| 20 75 67 6c 79 20 76 61 | 72 69 61 62 6c 65 20 6e | ugly va|riable n|
|00004890| 61 6d 65 73 20 75 73 69 | 6e 67 20 5b 5f 30 2d 39 |ames usi|ng [_0-9|
|000048a0| 61 2d 7a 41 2d 5a 5d 20 | 74 68 61 74 20 65 6e 63 |a-zA-Z] |that enc|
|000048b0| 6f 64 65 20 74 68 65 20 | 72 65 61 6c 20 6e 61 6d |ode the |real nam|
|000048c0| 65 3b 0a 20 2a 20 64 65 | 66 69 6e 65 20 50 52 4f |e;. * de|fine PRO|
|000048d0| 54 45 43 54 5f 45 4e 56 | 20 66 6f 72 20 74 68 69 |TECT_ENV| for thi|
|000048e0| 73 20 68 61 63 6b 2e 20 | 28 4b 6e 6f 77 6e 20 6f |s hack. |(Known o|
|000048f0| 66 66 65 6e 64 65 72 73 | 3a 20 65 76 65 72 79 20 |ffenders|: every |
|00004900| 73 68 20 49 20 68 61 76 | 65 20 74 72 69 65 64 3b |sh I hav|e tried;|
|00004910| 0a 20 2a 20 53 75 6e 4f | 53 20 28 73 69 6c 65 6e |. * SunO|S (silen|
|00004920| 74 6c 79 20 64 69 73 63 | 61 72 64 73 29 2c 20 4e |tly disc|ards), N|
|00004930| 65 58 54 20 28 61 62 6f | 72 74 73 20 77 69 74 68 |eXT (abo|rts with|
|00004940| 20 65 72 72 6f 72 29 2c | 20 53 47 49 20 28 61 62 | error),| SGI (ab|
|00004950| 6f 72 74 73 20 77 69 74 | 68 0a 20 2a 20 65 72 72 |orts wit|h. * err|
|00004960| 6f 72 29 2c 20 55 6c 74 | 72 69 78 20 28 73 68 20 |or), Ult|rix (sh |
|00004970| 73 65 65 6d 73 20 74 6f | 20 77 6f 72 6b 2c 20 73 |seems to| work, s|
|00004980| 68 35 20 61 62 6f 72 74 | 73 20 77 69 74 68 20 65 |h5 abort|s with e|
|00004990| 72 72 6f 72 29 29 0a 23 | 64 65 66 69 6e 65 20 50 |rror)).#|define P|
|000049a0| 52 4f 54 45 43 54 5f 45 | 4e 56 0a 20 2a 2f 0a 0a |ROTECT_E|NV. */..|
|000049b0| 2f 2a 0a 20 2a 20 44 65 | 66 69 6e 65 20 74 68 65 |/*. * De|fine the|
|000049c0| 20 6d 61 63 72 6f 20 4e | 4f 45 43 48 4f 20 69 66 | macro N|OECHO if|
|000049d0| 20 79 6f 75 20 77 69 73 | 68 20 74 6f 20 6f 6d 69 | you wis|h to omi|
|000049e0| 74 20 72 63 27 73 20 65 | 63 68 6f 20 62 75 69 6c |t rc's e|cho buil|
|000049f0| 74 69 6e 20 66 72 6f 6d | 20 74 68 65 0a 20 2a 20 |tin from| the. * |
|00004a00| 63 6f 6d 70 69 6c 65 2e | 0a 23 64 65 66 69 6e 65 |compile.|.#define|
|00004a10| 20 4e 4f 45 43 48 4f 0a | 20 2a 2f 0a 0a 2f 2a 0a | NOECHO.| */../*.|
|00004a20| 20 2a 20 44 65 66 69 6e | 65 20 74 68 65 20 4e 4f | * Defin|e the NO|
|00004a30| 4a 4f 42 20 69 66 20 79 | 6f 75 20 64 6f 20 2a 6e |JOB if y|ou do *n|
|00004a40| 6f 74 2a 20 77 69 73 68 | 20 72 63 20 74 6f 20 70 |ot* wish| rc to p|
|00004a50| 65 72 66 6f 72 6d 20 62 | 61 63 6b 67 72 6f 75 6e |erform b|ackgroun|
|00004a60| 64 69 6e 67 0a 20 2a 20 | 61 73 20 69 66 20 69 74 |ding. * |as if it|
|00004a70| 20 77 65 72 65 20 61 20 | 6a 6f 62 2d 63 6f 6e 74 | were a |job-cont|
|00004a80| 72 6f 6c 20 73 68 65 6c | 6c 3b 20 74 68 61 74 20 |rol shel|l; that |
|00004a90| 69 73 2c 20 69 66 20 79 | 6f 75 20 64 6f 20 2a 6e |is, if y|ou do *n|
|00004aa0| 6f 74 2a 20 77 69 73 68 | 0a 20 2a 20 69 74 20 74 |ot* wish|. * it t|
|00004ab0| 6f 20 70 75 74 20 61 20 | 63 6f 6d 6d 61 6e 64 20 |o put a |command |
|00004ac0| 73 70 61 77 6e 65 64 20 | 69 6e 20 74 68 65 20 62 |spawned |in the b|
|00004ad0| 61 63 6b 67 72 6f 75 6e | 64 20 69 6e 74 6f 20 61 |ackgroun|d into a|
|00004ae0| 20 6e 65 77 20 70 72 6f | 63 65 73 73 0a 20 2a 20 | new pro|cess. * |
|00004af0| 67 72 6f 75 70 2e 20 53 | 69 6e 63 65 20 6d 6f 73 |group. S|ince mos|
|00004b00| 74 20 73 79 73 74 65 6d | 73 20 73 75 70 70 6f 72 |t system|s suppor|
|00004b10| 74 20 6a 6f 62 20 63 6f | 6e 74 72 6f 6c 20 61 6e |t job co|ntrol an|
|00004b20| 64 20 73 69 6e 63 65 20 | 74 68 65 72 65 20 61 72 |d since |there ar|
|00004b30| 65 0a 20 2a 20 6d 61 6e | 79 20 62 72 6f 6b 65 6e |e. * man|y broken|
|00004b40| 20 70 72 6f 67 72 61 6d | 73 20 74 68 61 74 20 64 | program|s that d|
|00004b50| 6f 20 6e 6f 74 20 62 65 | 68 61 76 65 20 63 6f 72 |o not be|have cor|
|00004b60| 72 65 63 74 6c 79 20 77 | 68 65 6e 20 62 61 63 6b |rectly w|hen back|
|00004b70| 67 72 6f 75 6e 64 65 64 | 0a 20 2a 20 69 6e 20 61 |grounded|. * in a|
|00004b80| 20 76 37 20 6e 6f 6e 2d | 6a 6f 62 2d 63 6f 6e 74 | v7 non-|job-cont|
|00004b90| 72 6f 6c 20 66 61 73 68 | 69 6f 6e 2c 20 72 63 20 |rol fash|ion, rc |
|00004ba0| 62 79 20 64 65 66 61 75 | 6c 74 20 70 65 72 66 6f |by defau|lt perfo|
|00004bb0| 72 6d 73 20 61 20 6a 6f | 62 2d 0a 20 2a 20 63 6f |rms a jo|b-. * co|
|00004bc0| 6e 74 72 6f 6c 2d 6c 69 | 6b 65 20 62 61 63 6b 67 |ntrol-li|ke backg|
|00004bd0| 72 6f 75 6e 64 69 6e 67 | 2e 0a 23 64 65 66 69 6e |rounding|..#defin|
|00004be0| 65 20 4e 4f 4a 4f 42 0a | 20 2a 2f 0a 0a 2f 2a 20 |e NOJOB.| */../* |
|00004bf0| 42 65 67 69 6e 6e 69 6e | 67 20 6f 66 20 64 65 66 |Beginnin|g of def|
|00004c00| 61 75 6c 74 73 20 73 65 | 63 74 69 6f 6e 3a 20 2a |aults se|ction: *|
|00004c10| 2f 0a 0a 23 69 66 6e 64 | 65 66 20 43 55 53 54 4f |/..#ifnd|ef CUSTO|
|00004c20| 4d 0a 0a 2f 2a 0a 20 2a | 20 53 75 67 67 65 73 74 |M../*. *| Suggest|
|00004c30| 65 64 20 73 65 74 74 69 | 6e 67 73 20 66 6f 72 20 |ed setti|ngs for |
|00004c40| 53 75 6e 2c 20 4e 65 58 | 54 20 61 6e 64 20 73 67 |Sun, NeX|T and sg|
|00004c50| 69 20 28 6d 61 63 68 69 | 6e 65 73 20 68 65 72 65 |i (machi|nes here|
|00004c60| 20 61 74 20 54 41 4d 55 | 29 3a 0a 20 2a 2f 0a 0a | at TAMU|):. */..|
|00004c70| 23 69 66 64 65 66 20 4e | 65 58 54 09 09 2f 2a 20 |#ifdef N|eXT../* |
|00004c80| 55 73 65 64 20 6f 6e 20 | 4e 65 78 74 4f 53 20 32 |Used on |NextOS 2|
|00004c90| 2e 31 20 2a 2f 0a 23 64 | 65 66 69 6e 65 20 4e 4f |.1 */.#d|efine NO|
|00004ca0| 44 49 52 45 4e 54 0a 23 | 64 65 66 69 6e 65 09 50 |DIRENT.#|define.P|
|00004cb0| 52 4f 54 45 43 54 5f 45 | 4e 56 0a 23 64 65 66 69 |ROTECT_E|NV.#defi|
|00004cc0| 6e 65 20 4e 4f 43 4d 44 | 41 52 47 0a 23 65 6e 64 |ne NOCMD|ARG.#end|
|00004cd0| 69 66 0a 0a 23 69 66 64 | 65 66 20 73 67 69 09 09 |if..#ifd|ef sgi..|
|00004ce0| 2f 2a 20 55 73 65 64 20 | 6f 6e 20 49 72 69 78 20 |/* Used |on Irix |
|00004cf0| 33 2e 33 2e 5b 31 32 5d | 20 2a 2f 0a 23 64 65 66 |3.3.[12]| */.#def|
|00004d00| 69 6e 65 20 53 56 53 49 | 47 53 0a 23 64 65 66 69 |ine SVSI|GS.#defi|
|00004d10| 6e 65 20 4e 4f 53 49 47 | 43 4c 44 0a 23 64 65 66 |ne NOSIG|CLD.#def|
|00004d20| 69 6e 65 09 50 52 4f 54 | 45 43 54 5f 45 4e 56 0a |ine.PROT|ECT_ENV.|
|00004d30| 23 75 6e 64 65 66 20 44 | 45 46 41 55 4c 54 50 41 |#undef D|EFAULTPA|
|00004d40| 54 48 0a 23 64 65 66 69 | 6e 65 20 44 45 46 41 55 |TH.#defi|ne DEFAU|
|00004d50| 4c 54 50 41 54 48 20 22 | 2f 75 73 72 2f 62 73 64 |LTPATH "|/usr/bsd|
|00004d60| 22 2c 20 22 2f 75 73 72 | 2f 73 62 69 6e 22 2c 20 |", "/usr|/sbin", |
|00004d70| 22 2f 75 73 72 2f 62 69 | 6e 22 2c 20 22 2f 62 69 |"/usr/bi|n", "/bi|
|00004d80| 6e 22 2c 20 22 2e 22 0a | 23 65 6e 64 69 66 0a 0a |n", ".".|#endif..|
|00004d90| 23 69 66 64 65 66 20 73 | 75 6e 09 09 2f 2a 20 55 |#ifdef s|un../* U|
|00004da0| 73 65 64 20 6f 6e 20 53 | 75 6e 4f 53 20 34 2e 31 |sed on S|unOS 4.1|
|00004db0| 2e 31 20 2a 2f 0a 23 64 | 65 66 69 6e 65 20 50 52 |.1 */.#d|efine PR|
|00004dc0| 4f 54 45 43 54 5f 45 4e | 56 0a 23 75 6e 64 65 66 |OTECT_EN|V.#undef|
|00004dd0| 20 44 45 46 41 55 4c 54 | 50 41 54 48 0a 23 64 65 | DEFAULT|PATH.#de|
|00004de0| 66 69 6e 65 20 44 45 46 | 41 55 4c 54 50 41 54 48 |fine DEF|AULTPATH|
|00004df0| 20 22 2f 75 73 72 2f 75 | 63 62 22 2c 20 22 2f 75 | "/usr/u|cb", "/u|
|00004e00| 73 72 2f 62 69 6e 22 2c | 20 22 2e 22 0a 23 65 6e |sr/bin",| ".".#en|
|00004e10| 64 69 66 0a 0a 2f 2a 0a | 20 2a 20 53 75 67 67 65 |dif../*.| * Sugge|
|00004e20| 73 74 65 64 20 73 65 74 | 74 69 6e 67 73 20 66 6f |sted set|tings fo|
|00004e30| 72 20 48 50 33 30 30 20 | 72 75 6e 6e 69 6e 67 20 |r HP300 |running |
|00004e40| 34 2e 33 42 53 44 2d 75 | 74 61 68 20 28 44 57 53 |4.3BSD-u|tah (DWS|
|00004e50| 29 3a 0a 20 2a 2f 0a 0a | 23 69 66 20 64 65 66 69 |):. */..|#if defi|
|00004e60| 6e 65 64 28 68 70 33 30 | 30 29 20 26 26 20 21 64 |ned(hp30|0) && !d|
|00004e70| 65 66 69 6e 65 64 28 68 | 70 75 78 29 0a 23 64 65 |efined(h|pux).#de|
|00004e80| 66 69 6e 65 20 4e 4f 44 | 49 52 45 4e 54 0a 23 64 |fine NOD|IRENT.#d|
|00004e90| 65 66 69 6e 65 20 4e 4f | 43 4d 44 41 52 47 0a 23 |efine NO|CMDARG.#|
|00004ea0| 64 65 66 69 6e 65 20 44 | 45 46 41 55 4c 54 49 4e |define D|EFAULTIN|
|00004eb0| 54 45 52 50 20 22 2f 62 | 69 6e 2f 73 68 22 0a 23 |TERP "/b|in/sh".#|
|00004ec0| 64 65 66 69 6e 65 20 50 | 52 4f 54 45 43 54 5f 45 |define P|ROTECT_E|
|00004ed0| 4e 56 0a 23 65 6e 64 69 | 66 0a 0a 2f 2a 0a 20 2a |NV.#endi|f../*. *|
|00004ee0| 20 53 75 67 67 65 73 74 | 65 64 20 73 65 74 74 69 | Suggest|ed setti|
|00004ef0| 6e 67 73 20 66 6f 72 20 | 55 6c 74 72 69 78 0a 20 |ngs for |Ultrix. |
|00004f00| 2a 2f 0a 0a 23 69 66 64 | 65 66 20 75 6c 74 72 69 |*/..#ifd|ef ultri|
|00004f10| 78 0a 23 64 65 66 69 6e | 65 20 50 52 4f 54 45 43 |x.#defin|e PROTEC|
|00004f20| 54 5f 45 4e 56 0a 23 64 | 65 66 69 6e 65 20 44 45 |T_ENV.#d|efine DE|
|00004f30| 46 41 55 4c 54 49 4e 54 | 45 52 50 20 22 2f 62 69 |FAULTINT|ERP "/bi|
|00004f40| 6e 2f 73 68 22 09 2f 2a | 20 73 6f 20 2f 62 69 6e |n/sh"./*| so /bin|
|00004f50| 2f 74 72 75 65 20 63 61 | 6e 20 77 6f 72 6b 20 2a |/true ca|n work *|
|00004f60| 2f 0a 23 65 6e 64 69 66 | 0a 0a 2f 2a 0a 20 2a 20 |/.#endif|../*. * |
|00004f70| 53 75 67 67 65 73 74 65 | 64 20 73 65 74 74 69 6e |Suggeste|d settin|
|00004f80| 67 73 20 66 6f 72 20 52 | 49 53 43 6f 73 20 34 2e |gs for R|ISCos 4.|
|00004f90| 35 32 0a 20 2a 2f 0a 0a | 2f 2a 0a 20 20 20 54 68 |52. */..|/*. Th|
|00004fa0| 69 73 20 64 6f 65 73 6e | 27 74 20 77 6f 72 6b 20 |is doesn|'t work |
|00004fb0| 77 69 74 68 6f 75 74 20 | 69 6e 74 65 72 66 65 72 |without |interfer|
|00004fc0| 69 6e 67 20 77 69 74 68 | 20 6f 74 68 65 72 20 4d |ing with| other M|
|00004fd0| 49 50 53 2d 62 61 73 65 | 64 0a 20 20 20 73 79 73 |IPS-base|d. sys|
|00004fe0| 74 65 6d 73 27 20 63 6f | 6e 66 69 67 75 72 61 74 |tems' co|nfigurat|
|00004ff0| 69 6f 6e 2e 20 50 6c 65 | 61 73 65 20 64 6f 20 69 |ion. Ple|ase do i|
|00005000| 74 20 62 79 20 68 61 6e | 64 2e 0a 2a 2f 0a 0a 23 |t by han|d..*/..#|
|00005010| 69 66 20 64 65 66 69 6e | 65 64 28 68 6f 73 74 5f |if defin|ed(host_|
|00005020| 6d 69 70 73 29 20 26 26 | 20 64 65 66 69 6e 65 64 |mips) &&| defined|
|00005030| 28 4d 49 50 53 45 42 29 | 20 26 26 20 64 65 66 69 |(MIPSEB)| && defi|
|00005040| 6e 65 64 28 53 59 53 54 | 59 50 45 5f 42 53 44 34 |ned(SYST|YPE_BSD4|
|00005050| 33 29 0a 23 64 65 66 69 | 6e 65 20 4e 4f 44 49 52 |3).#defi|ne NODIR|
|00005060| 45 4e 54 0a 23 64 65 66 | 69 6e 65 20 50 52 4f 54 |ENT.#def|ine PROT|
|00005070| 45 43 54 5f 45 4e 56 0a | 23 65 6e 64 69 66 0a 0a |ECT_ENV.|#endif..|
|00005080| 2f 2a 0a 20 2a 20 53 75 | 67 67 65 73 74 65 64 20 |/*. * Su|ggested |
|00005090| 73 65 74 74 69 6e 67 73 | 20 66 6f 72 20 41 49 58 |settings| for AIX|
|000050a0| 0a 20 2a 2f 0a 0a 23 69 | 66 64 65 66 20 5f 41 49 |. */..#i|fdef _AI|
|000050b0| 58 0a 23 64 65 66 69 6e | 65 20 50 52 4f 54 45 43 |X.#defin|e PROTEC|
|000050c0| 54 5f 45 4e 56 0a 23 65 | 6e 64 69 66 0a 0a 2f 2a |T_ENV.#e|ndif../*|
|000050d0| 0a 20 2a 20 53 75 67 67 | 65 73 74 65 64 20 73 65 |. * Sugg|ested se|
|000050e0| 74 74 69 6e 67 73 20 66 | 6f 72 20 4f 53 46 2f 31 |ttings f|or OSF/1|
|000050f0| 20 31 2e 30 0a 20 2a 2f | 0a 0a 23 69 66 64 65 66 | 1.0. */|..#ifdef|
|00005100| 20 4f 53 46 31 0a 23 64 | 65 66 69 6e 65 20 50 52 | OSF1.#d|efine PR|
|00005110| 4f 54 45 43 54 5f 45 4e | 56 0a 23 65 6e 64 69 66 |OTECT_EN|V.#endif|
|00005120| 0a 0a 2f 2a 0a 20 2a 20 | 53 75 67 67 65 73 74 65 |../*. * |Suggeste|
|00005130| 64 20 73 65 74 74 69 6e | 67 73 20 66 6f 72 20 55 |d settin|gs for U|
|00005140| 6e 69 63 6f 73 20 58 58 | 58 0a 20 2a 2f 0a 0a 23 |nicos XX|X. */..#|
|00005150| 69 66 64 65 66 20 63 72 | 61 79 0a 23 64 65 66 69 |ifdef cr|ay.#defi|
|00005160| 6e 65 20 50 52 4f 54 45 | 43 54 5f 45 4e 56 0a 23 |ne PROTE|CT_ENV.#|
|00005170| 64 65 66 69 6e 65 20 4e | 4f 4c 49 4d 49 54 53 0a |define N|OLIMITS.|
|00005180| 23 64 65 66 69 6e 65 20 | 77 6f 72 64 20 5f 77 6f |#define |word _wo|
|00005190| 72 64 0a 23 64 65 66 69 | 6e 65 20 44 45 46 41 55 |rd.#defi|ne DEFAU|
|000051a0| 4c 54 49 4e 54 45 52 50 | 20 22 2f 62 69 6e 2f 73 |LTINTERP| "/bin/s|
|000051b0| 68 22 0a 23 65 6e 64 69 | 66 0a 0a 23 65 6e 64 69 |h".#endi|f..#endi|
|000051c0| 66 20 2f 2a 20 43 55 53 | 54 4f 4d 20 2a 2f 0a 0a |f /* CUS|TOM */..|
|000051d0| 23 69 66 6e 64 65 66 20 | 54 4d 50 44 49 52 0a 23 |#ifndef |TMPDIR.#|
|000051e0| 64 65 66 69 6e 65 20 54 | 4d 50 44 49 52 20 22 2f |define T|MPDIR "/|
|000051f0| 74 6d 70 22 0a 23 65 6e | 64 69 66 0a 00 00 00 00 |tmp".#en|dif.....|
|00005200| 72 63 2d 31 2e 35 2d 6c | 69 6e 75 78 2f 63 6f 6e |rc-1.5-l|inux/con|
|00005210| 66 69 67 2e 68 2d 64 69 | 73 74 00 00 00 00 00 00 |fig.h-di|st......|
|00005220| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005230| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005240| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005250| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005260| 00 00 00 00 31 30 30 36 | 30 30 20 00 20 20 20 36 |....1006|00 . 6|
|00005270| 32 35 20 00 20 20 20 20 | 20 31 20 00 20 20 20 20 |25 . | 1 . |
|00005280| 20 20 31 31 37 33 32 20 | 20 35 32 31 30 32 32 37 | 11732 | 5210227|
|00005290| 30 35 31 20 20 31 33 34 | 30 31 00 20 30 00 00 00 |051 134|01. 0...|
|000052a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000052b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000052c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000052d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000052e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000052f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005300| 00 75 73 74 61 72 20 20 | 00 63 62 00 00 00 00 00 |.ustar |.cb.....|
|00005310| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005320| 00 00 00 00 00 00 00 00 | 00 6f 74 68 65 72 00 00 |........|.other..|
|00005330| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005340| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005350| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005360| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005370| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005380| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005390| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000053a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000053b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000053c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000053d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000053e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000053f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005400| 2f 2a 20 43 6f 70 79 20 | 63 6f 6e 66 69 67 2e 68 |/* Copy |config.h|
|00005410| 2d 64 69 73 74 20 74 6f | 20 63 6f 6e 66 69 67 2e |-dist to| config.|
|00005420| 68 20 61 6e 64 20 65 64 | 69 74 20 63 6f 6e 66 69 |h and ed|it confi|
|00005430| 67 2e 68 2c 20 64 6f 6e | 27 74 20 65 64 69 74 20 |g.h, don|'t edit |
|00005440| 74 68 69 73 20 66 69 6c | 65 20 2a 2f 0a 0a 2f 2a |this fil|e */../*|
|00005450| 0a 20 2a 20 43 6f 6e 66 | 69 67 75 72 61 74 69 6f |. * Conf|iguratio|
|00005460| 6e 20 70 61 72 61 6d 65 | 74 65 72 73 20 66 6f 72 |n parame|ters for|
|00005470| 20 72 63 2e 20 53 75 67 | 67 65 73 74 65 64 20 64 | rc. Sug|gested d|
|00005480| 65 66 61 75 6c 74 73 20 | 61 72 65 20 61 74 20 74 |efaults |are at t|
|00005490| 68 65 20 62 6f 74 74 6f | 6d 0a 20 2a 20 6f 66 20 |he botto|m. * of |
|000054a0| 74 68 69 73 20 66 69 6c | 65 20 28 79 6f 75 20 73 |this fil|e (you s|
|000054b0| 68 6f 75 6c 64 20 70 72 | 6f 62 61 62 6c 79 20 6c |hould pr|obably l|
|000054c0| 6f 6f 6b 20 61 74 20 74 | 68 6f 73 65 20 66 69 72 |ook at t|hose fir|
|000054d0| 73 74 20 74 6f 20 73 65 | 65 20 69 66 20 79 6f 75 |st to se|e if you|
|000054e0| 72 0a 20 2a 20 73 79 73 | 74 65 6d 20 6d 61 74 63 |r. * sys|tem matc|
|000054f0| 68 65 73 20 6f 6e 65 20 | 6f 66 20 74 68 65 6d 3b |hes one |of them;|
|00005500| 20 79 6f 75 20 63 61 6e | 20 73 65 61 72 63 68 20 | you can| search |
|00005510| 66 6f 72 20 74 68 65 20 | 62 65 67 69 6e 6e 69 6e |for the |beginnin|
|00005520| 67 20 6f 66 20 74 68 65 | 0a 20 2a 20 64 65 66 61 |g of the|. * defa|
|00005530| 75 6c 74 73 20 73 65 63 | 74 69 6f 6e 20 62 79 20 |ults sec|tion by |
|00005540| 6c 6f 6f 6b 69 6e 67 20 | 66 6f 72 20 74 68 65 20 |looking |for the |
|00005550| 73 74 72 69 6e 67 20 22 | 23 69 66 6e 64 65 66 20 |string "|#ifndef |
|00005560| 43 55 53 54 4f 4d 22 29 | 2e 20 49 66 20 79 6f 75 |CUSTOM")|. If you|
|00005570| 0a 20 2a 20 77 61 6e 74 | 20 74 6f 20 6f 76 65 72 |. * want| to over|
|00005580| 72 69 64 65 20 74 68 65 | 20 73 75 67 67 65 73 74 |ride the| suggest|
|00005590| 65 64 20 64 65 66 61 75 | 6c 74 73 2c 20 64 65 66 |ed defau|lts, def|
|000055a0| 69 6e 65 20 74 68 65 20 | 6d 61 63 72 6f 20 43 55 |ine the |macro CU|
|000055b0| 53 54 4f 4d 2e 0a 23 64 | 65 66 69 6e 65 20 43 55 |STOM..#d|efine CU|
|000055c0| 53 54 4f 4d 0a 20 2a 2f | 0a 0a 2f 2a 0a 20 2a 20 |STOM. */|../*. * |
|000055d0| 28 4e 6f 74 65 20 74 68 | 61 74 20 63 65 72 74 61 |(Note th|at certa|
|000055e0| 69 6e 20 64 65 66 61 75 | 6c 74 20 73 65 74 74 69 |in defau|lt setti|
|000055f0| 6e 67 73 20 72 65 64 65 | 66 69 6e 65 20 74 68 69 |ngs rede|fine thi|
|00005600| 73 20 6d 61 63 72 6f 29 | 0a 20 2a 20 44 45 46 41 |s macro)|. * DEFA|
|00005610| 55 4c 54 50 41 54 48 20 | 74 68 65 20 64 65 66 61 |ULTPATH |the defa|
|00005620| 75 6c 74 20 73 65 61 72 | 63 68 20 70 61 74 68 20 |ult sear|ch path |
|00005630| 74 68 61 74 20 72 63 20 | 75 73 65 73 20 77 68 65 |that rc |uses whe|
|00005640| 6e 20 69 74 20 69 73 20 | 73 74 61 72 74 65 64 0a |n it is |started.|
|00005650| 20 2a 20 77 69 74 68 6f | 75 74 20 65 69 74 68 65 | * witho|ut eithe|
|00005660| 72 20 61 20 24 50 41 54 | 48 20 6f 72 20 24 70 61 |r a $PAT|H or $pa|
|00005670| 74 68 20 65 6e 76 69 72 | 6f 6e 6d 65 6e 74 20 76 |th envir|onment v|
|00005680| 61 72 69 61 62 6c 65 2e | 20 59 6f 75 20 6d 75 73 |ariable.| You mus|
|00005690| 74 20 70 69 63 6b 0a 20 | 2a 20 73 6f 6d 65 74 68 |t pick. |* someth|
|000056a0| 69 6e 67 20 73 65 6e 73 | 69 62 6c 65 20 66 6f 72 |ing sens|ible for|
|000056b0| 20 79 6f 75 72 20 73 79 | 73 74 65 6d 20 69 66 20 | your sy|stem if |
|000056c0| 79 6f 75 20 64 6f 6e 27 | 74 20 6c 69 6b 65 20 74 |you don'|t like t|
|000056d0| 68 65 20 70 61 74 68 20 | 73 68 6f 77 6e 0a 20 2a |he path |shown. *|
|000056e0| 20 62 65 6c 6f 77 2e 0a | 20 2a 2f 0a 23 64 65 66 | below..| */.#def|
|000056f0| 69 6e 65 20 44 45 46 41 | 55 4c 54 50 41 54 48 20 |ine DEFA|ULTPATH |
|00005700| 22 2f 75 73 72 2f 75 63 | 62 22 2c 20 22 2f 75 73 |"/usr/uc|b", "/us|
|00005710| 72 2f 62 69 6e 22 2c 20 | 22 2f 62 69 6e 22 2c 20 |r/bin", |"/bin", |
|00005720| 22 2e 22 0a 0a 2f 2a 0a | 20 2a 20 44 65 66 69 6e |"."../*.| * Defin|
|00005730| 65 20 74 68 65 20 6d 61 | 63 72 6f 20 4e 4f 44 49 |e the ma|cro NODI|
|00005740| 52 45 4e 54 20 69 66 20 | 79 6f 75 72 20 73 79 73 |RENT if |your sys|
|00005750| 74 65 6d 20 68 61 73 20 | 3c 73 79 73 2f 64 69 72 |tem has |<sys/dir|
|00005760| 2e 68 3e 20 62 75 74 20 | 6e 6f 74 0a 20 2a 20 3c |.h> but |not. * <|
|00005770| 64 69 72 65 6e 74 2e 68 | 3e 2e 20 28 65 2e 67 2e |dirent.h|>. (e.g.|
|00005780| 2c 20 4e 65 58 54 2d 4f | 53 20 61 6e 64 20 52 49 |, NeXT-O|S and RI|
|00005790| 53 43 6f 73 29 0a 23 64 | 65 66 69 6e 65 20 4e 4f |SCos).#d|efine NO|
|000057a0| 44 49 52 45 4e 54 0a 20 | 2a 2f 0a 0a 2f 2a 0a 20 |DIRENT. |*/../*. |
|000057b0| 2a 20 44 65 66 69 6e 65 | 20 74 68 65 20 6d 61 63 |* Define| the mac|
|000057c0| 72 6f 20 53 56 53 49 47 | 53 20 69 66 20 79 6f 75 |ro SVSIG|S if you|
|000057d0| 72 20 73 79 73 74 65 6d | 20 68 61 73 20 53 79 73 |r system| has Sys|
|000057e0| 74 65 6d 20 56 20 73 69 | 67 6e 61 6c 20 73 65 6d |tem V si|gnal sem|
|000057f0| 61 6e 74 69 63 73 2c 0a | 20 2a 20 69 2e 65 2e 2c |antics,.| * i.e.,|
|00005800| 20 69 66 20 22 73 6c 6f | 77 22 20 73 79 73 74 65 | if "slo|w" syste|
|00005810| 6d 20 63 61 6c 6c 73 20 | 61 72 65 20 69 6e 74 65 |m calls |are inte|
|00005820| 72 72 75 70 74 65 64 20 | 72 61 74 68 65 72 20 74 |rrupted |rather t|
|00005830| 68 61 6e 20 72 65 73 75 | 6d 65 64 0a 20 2a 20 61 |han resu|med. * a|
|00005840| 66 74 65 72 20 72 65 74 | 75 72 6e 69 6e 67 20 66 |fter ret|urning f|
|00005850| 72 6f 6d 20 61 6e 20 69 | 6e 74 65 72 72 75 70 74 |rom an i|nterrupt|
|00005860| 20 68 61 6e 64 6c 65 72 | 2e 20 28 49 66 20 79 6f | handler|. (If yo|
|00005870| 75 20 61 72 65 20 6e 6f | 74 20 73 75 72 65 20 77 |u are no|t sure w|
|00005880| 68 61 74 0a 20 2a 20 74 | 68 69 73 20 6d 65 61 6e |hat. * t|his mean|
|00005890| 73 2c 20 73 65 65 20 74 | 68 65 20 6d 61 6e 20 70 |s, see t|he man p|
|000058a0| 61 67 65 20 66 6f 72 20 | 73 69 67 6e 61 6c 28 32 |age for |signal(2|
|000058b0| 29 2e 20 49 6e 20 61 6e | 79 20 63 61 73 65 2c 20 |). In an|y case, |
|000058c0| 69 74 20 69 73 20 70 72 | 6f 62 61 62 6c 79 0a 20 |it is pr|obably. |
|000058d0| 2a 20 73 61 66 65 20 74 | 6f 20 6c 65 61 76 65 20 |* safe t|o leave |
|000058e0| 74 68 69 73 20 6d 61 63 | 72 6f 20 75 6e 64 65 66 |this mac|ro undef|
|000058f0| 69 6e 65 64 2e 29 0a 23 | 64 65 66 69 6e 65 20 53 |ined.).#|define S|
|00005900| 56 53 49 47 53 0a 20 2a | 2f 0a 0a 2f 2a 0a 20 2a |VSIGS. *|/../*. *|
|00005910| 20 44 65 66 69 6e 65 20 | 74 68 65 20 6d 61 63 72 | Define |the macr|
|00005920| 6f 20 4e 4f 43 4d 44 41 | 52 47 20 69 66 20 79 6f |o NOCMDA|RG if yo|
|00005930| 75 20 64 6f 20 6e 6f 74 | 20 68 61 76 65 20 2f 64 |u do not| have /d|
|00005940| 65 76 2f 66 64 20 6f 72 | 20 66 69 66 6f 73 20 6f |ev/fd or| fifos o|
|00005950| 6e 20 79 6f 75 72 0a 20 | 2a 20 73 79 73 74 65 6d |n your. |* system|
|00005960| 2e 20 59 6f 75 20 6d 61 | 79 20 61 6c 73 6f 20 77 |. You ma|y also w|
|00005970| 61 6e 74 20 74 6f 20 64 | 65 66 69 6e 65 20 74 68 |ant to d|efine th|
|00005980| 69 73 20 69 66 20 79 6f | 75 20 68 61 76 65 20 62 |is if yo|u have b|
|00005990| 72 6f 6b 65 6e 20 66 69 | 66 6f 73 2e 0a 23 64 65 |roken fi|fos..#de|
|000059a0| 66 69 6e 65 20 4e 4f 43 | 4d 44 41 52 47 0a 20 2a |fine NOC|MDARG. *|
|000059b0| 2f 0a 0a 2f 2a 0a 20 2a | 20 44 65 66 69 6e 65 20 |/../*. *| Define |
|000059c0| 54 4d 50 44 49 52 20 69 | 66 20 79 6f 75 20 6e 65 |TMPDIR i|f you ne|
|000059d0| 65 64 20 74 6f 20 68 61 | 76 65 20 72 63 20 63 72 |ed to ha|ve rc cr|
|000059e0| 65 61 74 65 20 69 74 73 | 20 66 69 66 6f 73 20 69 |eate its| fifos i|
|000059f0| 6e 20 61 20 64 69 72 65 | 63 74 6f 72 79 0a 20 2a |n a dire|ctory. *|
|00005a00| 20 6f 74 68 65 72 20 74 | 68 61 6e 20 2f 74 6d 70 | other t|han /tmp|
|00005a10| 2e 20 46 6f 72 20 65 78 | 61 6d 70 6c 65 2c 20 69 |. For ex|ample, i|
|00005a20| 66 20 79 6f 75 20 68 61 | 76 65 20 61 20 53 75 6e |f you ha|ve a Sun|
|00005a30| 20 77 69 74 68 20 2f 74 | 6d 70 20 6d 6f 75 6e 74 | with /t|mp mount|
|00005a40| 65 64 0a 20 2a 20 61 73 | 20 61 20 72 61 6d 64 69 |ed. * as| a ramdi|
|00005a50| 73 6b 20 28 74 79 70 65 | 20 22 74 6d 70 66 73 22 |sk (type| "tmpfs"|
|00005a60| 29 20 74 68 65 6e 20 79 | 6f 75 20 63 61 6e 6e 6f |) then y|ou canno|
|00005a70| 74 20 75 73 65 20 66 69 | 66 6f 73 20 69 6e 20 2f |t use fi|fos in /|
|00005a80| 74 6d 70 20 28 73 69 67 | 68 29 2e 0a 23 64 65 66 |tmp (sig|h)..#def|
|00005a90| 69 6e 65 20 54 4d 50 44 | 49 52 20 22 2f 76 61 72 |ine TMPD|IR "/var|
|00005aa0| 2f 74 6d 70 22 0a 20 2a | 2f 0a 0a 2f 2a 0a 20 2a |/tmp". *|/../*. *|
|00005ab0| 20 44 65 66 69 6e 65 20 | 74 68 65 20 6d 61 63 72 | Define |the macr|
|00005ac0| 6f 20 44 45 56 46 44 20 | 69 66 20 79 6f 75 72 20 |o DEVFD |if your |
|00005ad0| 73 79 73 74 65 6d 20 73 | 75 70 70 6f 72 74 73 20 |system s|upports |
|00005ae0| 2f 64 65 76 2f 66 64 2e | 0a 23 64 65 66 69 6e 65 |/dev/fd.|.#define|
|00005af0| 20 44 45 56 46 44 0a 20 | 2a 2f 0a 0a 2f 2a 0a 20 | DEVFD. |*/../*. |
|00005b00| 2a 20 44 65 66 69 6e 65 | 20 74 68 65 20 6d 61 63 |* Define| the mac|
|00005b10| 72 6f 20 4e 4f 4c 49 4d | 49 54 53 20 69 66 20 79 |ro NOLIM|ITS if y|
|00005b20| 6f 75 72 20 73 79 73 74 | 65 6d 20 64 6f 65 73 20 |our syst|em does |
|00005b30| 6e 6f 74 20 73 75 70 70 | 6f 72 74 20 42 65 72 6b |not supp|ort Berk|
|00005b40| 65 6c 65 79 0a 20 2a 20 | 6c 69 6d 69 74 73 2e 0a |eley. * |limits..|
|00005b50| 23 64 65 66 69 6e 65 20 | 4e 4f 4c 49 4d 49 54 53 |#define |NOLIMITS|
|00005b60| 0a 20 2a 2f 0a 0a 2f 2a | 0a 20 2a 20 44 65 66 69 |. */../*|. * Defi|
|00005b70| 6e 65 20 74 68 65 20 6d | 61 63 72 6f 20 4e 4f 53 |ne the m|acro NOS|
|00005b80| 49 47 43 4c 44 20 69 66 | 20 79 6f 75 72 20 73 79 |IGCLD if| your sy|
|00005b90| 73 74 65 6d 20 75 73 65 | 73 20 53 49 47 43 4c 44 |stem use|s SIGCLD|
|00005ba0| 20 69 6e 20 74 68 65 20 | 53 79 73 74 65 6d 0a 20 | in the |System. |
|00005bb0| 2a 20 56 20 77 61 79 2e | 20 28 65 2e 67 2e 2c 20 |* V way.| (e.g., |
|00005bc0| 73 67 69 27 73 20 49 72 | 69 78 29 0a 23 64 65 66 |sgi's Ir|ix).#def|
|00005bd0| 69 6e 65 20 4e 4f 53 49 | 47 43 4c 44 0a 20 2a 2f |ine NOSI|GCLD. */|
|00005be0| 0a 0a 2f 2a 0a 20 2a 20 | 44 65 66 69 6e 65 20 74 |../*. * |Define t|
|00005bf0| 68 65 20 6d 61 63 72 6f | 20 52 45 41 44 4c 49 4e |he macro| READLIN|
|00005c00| 45 20 69 66 20 79 6f 75 | 20 77 61 6e 74 20 72 63 |E if you| want rc|
|00005c10| 20 74 6f 20 63 61 6c 6c | 20 47 4e 55 20 72 65 61 | to call| GNU rea|
|00005c20| 64 6c 69 6e 65 0a 20 2a | 20 69 6e 73 74 65 61 64 |dline. *| instead|
|00005c30| 20 6f 66 20 72 65 61 64 | 28 32 29 20 6f 6e 20 69 | of read|(2) on i|
|00005c40| 6e 74 65 72 61 63 74 69 | 76 65 20 73 68 65 6c 6c |nteracti|ve shell|
|00005c50| 73 2e 0a 23 64 65 66 69 | 6e 65 20 52 45 41 44 4c |s..#defi|ne READL|
|00005c60| 49 4e 45 0a 20 2a 2f 0a | 0a 2f 2a 0a 20 2a 20 44 |INE. */.|./*. * D|
|00005c70| 65 66 69 6e 65 20 74 68 | 65 20 6d 61 63 72 6f 20 |efine th|e macro |
|00005c80| 4e 4f 45 58 45 43 56 45 | 20 69 66 20 79 6f 75 72 |NOEXECVE| if your|
|00005c90| 20 55 6e 69 78 20 64 6f | 65 73 20 6e 6f 74 20 69 | Unix do|es not i|
|00005ca0| 6e 74 65 72 70 72 65 74 | 20 23 21 20 69 6e 20 74 |nterpret| #! in t|
|00005cb0| 68 65 0a 20 2a 20 6b 65 | 72 6e 65 6c 2c 20 61 6e |he. * ke|rnel, an|
|00005cc0| 64 20 75 6e 63 6f 6d 6d | 65 6e 74 20 74 68 65 20 |d uncomm|ent the |
|00005cd0| 45 58 45 43 56 45 20 76 | 61 72 69 61 62 6c 65 20 |EXECVE v|ariable |
|00005ce0| 69 6e 20 74 68 65 20 4d | 61 6b 65 66 69 6c 65 2e |in the M|akefile.|
|00005cf0| 0a 23 64 65 66 69 6e 65 | 20 4e 4f 45 58 45 43 56 |.#define| NOEXECV|
|00005d00| 45 0a 20 2a 2f 0a 0a 2f | 2a 0a 20 2a 20 49 66 20 |E. */../|*. * If |
|00005d10| 79 6f 75 20 77 61 6e 74 | 20 72 63 20 74 6f 20 64 |you want| rc to d|
|00005d20| 65 66 61 75 6c 74 20 74 | 6f 20 73 6f 6d 65 20 69 |efault t|o some i|
|00005d30| 6e 74 65 72 70 72 65 74 | 65 72 20 66 6f 72 20 66 |nterpret|er for f|
|00005d40| 69 6c 65 73 20 77 68 69 | 63 68 20 64 6f 6e 27 74 |iles whi|ch don't|
|00005d50| 0a 20 2a 20 68 61 76 65 | 20 61 20 6c 65 67 61 6c |. * have| a legal|
|00005d60| 20 23 21 20 6f 6e 20 74 | 68 65 20 66 69 72 73 74 | #! on t|he first|
|00005d70| 20 6c 69 6e 65 2c 20 64 | 65 66 69 6e 65 20 74 68 | line, d|efine th|
|00005d80| 65 20 6d 61 63 72 6f 20 | 44 45 46 41 55 4c 54 49 |e macro |DEFAULTI|
|00005d90| 4e 54 45 52 50 2e 0a 23 | 64 65 66 69 6e 65 20 44 |NTERP..#|define D|
|00005da0| 45 46 41 55 4c 54 49 4e | 54 45 52 50 20 22 2f 62 |EFAULTIN|TERP "/b|
|00005db0| 69 6e 2f 73 68 22 0a 20 | 2a 2f 0a 0a 2f 2a 0a 20 |in/sh". |*/../*. |
|00005dc0| 2a 20 49 66 20 79 6f 75 | 72 20 2f 62 69 6e 2f 73 |* If you|r /bin/s|
|00005dd0| 68 20 28 6f 72 20 61 6e | 6f 74 68 65 72 20 70 72 |h (or an|other pr|
|00005de0| 6f 67 72 61 6d 20 79 6f | 75 20 63 61 72 65 20 61 |ogram yo|u care a|
|00005df0| 62 6f 75 74 29 20 72 65 | 6a 65 63 74 73 20 65 6e |bout) re|jects en|
|00005e00| 76 69 72 6f 6e 6d 65 6e | 74 0a 20 2a 20 76 61 72 |vironmen|t. * var|
|00005e10| 69 61 62 6c 65 73 20 77 | 69 74 68 20 73 70 65 63 |iables w|ith spec|
|00005e20| 69 61 6c 20 63 68 61 72 | 61 63 74 65 72 73 20 69 |ial char|acters i|
|00005e30| 6e 20 74 68 65 6d 20 28 | 73 75 63 68 20 61 73 20 |n them (|such as |
|00005e40| 27 3a 27 20 6f 72 20 27 | 2d 27 29 2c 20 72 63 20 |':' or '|-'), rc |
|00005e50| 63 61 6e 0a 20 2a 20 70 | 75 74 20 6f 75 74 20 75 |can. * p|ut out u|
|00005e60| 67 6c 79 20 76 61 72 69 | 61 62 6c 65 20 6e 61 6d |gly vari|able nam|
|00005e70| 65 73 20 75 73 69 6e 67 | 20 5b 5f 30 2d 39 61 2d |es using| [_0-9a-|
|00005e80| 7a 41 2d 5a 5d 20 74 68 | 61 74 20 65 6e 63 6f 64 |zA-Z] th|at encod|
|00005e90| 65 20 74 68 65 20 72 65 | 61 6c 20 6e 61 6d 65 3b |e the re|al name;|
|00005ea0| 0a 20 2a 20 64 65 66 69 | 6e 65 20 50 52 4f 54 45 |. * defi|ne PROTE|
|00005eb0| 43 54 5f 45 4e 56 20 66 | 6f 72 20 74 68 69 73 20 |CT_ENV f|or this |
|00005ec0| 68 61 63 6b 2e 20 28 4b | 6e 6f 77 6e 20 6f 66 66 |hack. (K|nown off|
|00005ed0| 65 6e 64 65 72 73 3a 20 | 65 76 65 72 79 20 73 68 |enders: |every sh|
|00005ee0| 20 49 20 68 61 76 65 20 | 74 72 69 65 64 3b 0a 20 | I have |tried;. |
|00005ef0| 2a 20 53 75 6e 4f 53 20 | 28 73 69 6c 65 6e 74 6c |* SunOS |(silentl|
|00005f00| 79 20 64 69 73 63 61 72 | 64 73 29 2c 20 4e 65 58 |y discar|ds), NeX|
|00005f10| 54 20 28 61 62 6f 72 74 | 73 20 77 69 74 68 20 65 |T (abort|s with e|
|00005f20| 72 72 6f 72 29 2c 20 53 | 47 49 20 28 61 62 6f 72 |rror), S|GI (abor|
|00005f30| 74 73 20 77 69 74 68 0a | 20 2a 20 65 72 72 6f 72 |ts with.| * error|
|00005f40| 29 2c 20 55 6c 74 72 69 | 78 20 28 73 68 20 73 65 |), Ultri|x (sh se|
|00005f50| 65 6d 73 20 74 6f 20 77 | 6f 72 6b 2c 20 73 68 35 |ems to w|ork, sh5|
|00005f60| 20 61 62 6f 72 74 73 20 | 77 69 74 68 20 65 72 72 | aborts |with err|
|00005f70| 6f 72 29 29 0a 23 64 65 | 66 69 6e 65 20 50 52 4f |or)).#de|fine PRO|
|00005f80| 54 45 43 54 5f 45 4e 56 | 0a 20 2a 2f 0a 0a 2f 2a |TECT_ENV|. */../*|
|00005f90| 0a 20 2a 20 44 65 66 69 | 6e 65 20 74 68 65 20 6d |. * Defi|ne the m|
|00005fa0| 61 63 72 6f 20 4e 4f 45 | 43 48 4f 20 69 66 20 79 |acro NOE|CHO if y|
|00005fb0| 6f 75 20 77 69 73 68 20 | 74 6f 20 6f 6d 69 74 20 |ou wish |to omit |
|00005fc0| 72 63 27 73 20 65 63 68 | 6f 20 62 75 69 6c 74 69 |rc's ech|o builti|
|00005fd0| 6e 20 66 72 6f 6d 20 74 | 68 65 0a 20 2a 20 63 6f |n from t|he. * co|
|00005fe0| 6d 70 69 6c 65 2e 0a 23 | 64 65 66 69 6e 65 20 4e |mpile..#|define N|
|00005ff0| 4f 45 43 48 4f 0a 20 2a | 2f 0a 0a 2f 2a 0a 20 2a |OECHO. *|/../*. *|
|00006000| 20 44 65 66 69 6e 65 20 | 74 68 65 20 4e 4f 4a 4f | Define |the NOJO|
|00006010| 42 20 69 66 20 79 6f 75 | 20 64 6f 20 2a 6e 6f 74 |B if you| do *not|
|00006020| 2a 20 77 69 73 68 20 72 | 63 20 74 6f 20 70 65 72 |* wish r|c to per|
|00006030| 66 6f 72 6d 20 62 61 63 | 6b 67 72 6f 75 6e 64 69 |form bac|kgroundi|
|00006040| 6e 67 0a 20 2a 20 61 73 | 20 69 66 20 69 74 20 77 |ng. * as| if it w|
|00006050| 65 72 65 20 61 20 6a 6f | 62 2d 63 6f 6e 74 72 6f |ere a jo|b-contro|
|00006060| 6c 20 73 68 65 6c 6c 3b | 20 74 68 61 74 20 69 73 |l shell;| that is|
|00006070| 2c 20 69 66 20 79 6f 75 | 20 64 6f 20 2a 6e 6f 74 |, if you| do *not|
|00006080| 2a 20 77 69 73 68 0a 20 | 2a 20 69 74 20 74 6f 20 |* wish. |* it to |
|00006090| 70 75 74 20 61 20 63 6f | 6d 6d 61 6e 64 20 73 70 |put a co|mmand sp|
|000060a0| 61 77 6e 65 64 20 69 6e | 20 74 68 65 20 62 61 63 |awned in| the bac|
|000060b0| 6b 67 72 6f 75 6e 64 20 | 69 6e 74 6f 20 61 20 6e |kground |into a n|
|000060c0| 65 77 20 70 72 6f 63 65 | 73 73 0a 20 2a 20 67 72 |ew proce|ss. * gr|
|000060d0| 6f 75 70 2e 20 53 69 6e | 63 65 20 6d 6f 73 74 20 |oup. Sin|ce most |
|000060e0| 73 79 73 74 65 6d 73 20 | 73 75 70 70 6f 72 74 20 |systems |support |
|000060f0| 6a 6f 62 20 63 6f 6e 74 | 72 6f 6c 20 61 6e 64 20 |job cont|rol and |
|00006100| 73 69 6e 63 65 20 74 68 | 65 72 65 20 61 72 65 0a |since th|ere are.|
|00006110| 20 2a 20 6d 61 6e 79 20 | 62 72 6f 6b 65 6e 20 70 | * many |broken p|
|00006120| 72 6f 67 72 61 6d 73 20 | 74 68 61 74 20 64 6f 20 |rograms |that do |
|00006130| 6e 6f 74 20 62 65 68 61 | 76 65 20 63 6f 72 72 65 |not beha|ve corre|
|00006140| 63 74 6c 79 20 77 68 65 | 6e 20 62 61 63 6b 67 72 |ctly whe|n backgr|
|00006150| 6f 75 6e 64 65 64 0a 20 | 2a 20 69 6e 20 61 20 76 |ounded. |* in a v|
|00006160| 37 20 6e 6f 6e 2d 6a 6f | 62 2d 63 6f 6e 74 72 6f |7 non-jo|b-contro|
|00006170| 6c 20 66 61 73 68 69 6f | 6e 2c 20 72 63 20 62 79 |l fashio|n, rc by|
|00006180| 20 64 65 66 61 75 6c 74 | 20 70 65 72 66 6f 72 6d | default| perform|
|00006190| 73 20 61 20 6a 6f 62 2d | 0a 20 2a 20 63 6f 6e 74 |s a job-|. * cont|
|000061a0| 72 6f 6c 2d 6c 69 6b 65 | 20 62 61 63 6b 67 72 6f |rol-like| backgro|
|000061b0| 75 6e 64 69 6e 67 2e 0a | 23 64 65 66 69 6e 65 20 |unding..|#define |
|000061c0| 4e 4f 4a 4f 42 0a 20 2a | 2f 0a 0a 2f 2a 20 42 65 |NOJOB. *|/../* Be|
|000061d0| 67 69 6e 6e 69 6e 67 20 | 6f 66 20 64 65 66 61 75 |ginning |of defau|
|000061e0| 6c 74 73 20 73 65 63 74 | 69 6f 6e 3a 20 2a 2f 0a |lts sect|ion: */.|
|000061f0| 0a 23 69 66 6e 64 65 66 | 20 43 55 53 54 4f 4d 0a |.#ifndef| CUSTOM.|
|00006200| 0a 2f 2a 0a 20 2a 20 53 | 75 67 67 65 73 74 65 64 |./*. * S|uggested|
|00006210| 20 73 65 74 74 69 6e 67 | 73 20 66 6f 72 20 53 75 | setting|s for Su|
|00006220| 6e 2c 20 4e 65 58 54 20 | 61 6e 64 20 73 67 69 20 |n, NeXT |and sgi |
|00006230| 28 6d 61 63 68 69 6e 65 | 73 20 68 65 72 65 20 61 |(machine|s here a|
|00006240| 74 20 54 41 4d 55 29 3a | 0a 20 2a 2f 0a 0a 23 69 |t TAMU):|. */..#i|
|00006250| 66 64 65 66 20 4e 65 58 | 54 09 09 2f 2a 20 55 73 |fdef NeX|T../* Us|
|00006260| 65 64 20 6f 6e 20 4e 65 | 78 74 4f 53 20 32 2e 31 |ed on Ne|xtOS 2.1|
|00006270| 20 2a 2f 0a 23 64 65 66 | 69 6e 65 20 4e 4f 44 49 | */.#def|ine NODI|
|00006280| 52 45 4e 54 0a 23 64 65 | 66 69 6e 65 09 50 52 4f |RENT.#de|fine.PRO|
|00006290| 54 45 43 54 5f 45 4e 56 | 0a 23 64 65 66 69 6e 65 |TECT_ENV|.#define|
|000062a0| 20 4e 4f 43 4d 44 41 52 | 47 0a 23 65 6e 64 69 66 | NOCMDAR|G.#endif|
|000062b0| 0a 0a 23 69 66 64 65 66 | 20 73 67 69 09 09 2f 2a |..#ifdef| sgi../*|
|000062c0| 20 55 73 65 64 20 6f 6e | 20 49 72 69 78 20 33 2e | Used on| Irix 3.|
|000062d0| 33 2e 5b 31 32 5d 20 2a | 2f 0a 23 64 65 66 69 6e |3.[12] *|/.#defin|
|000062e0| 65 20 53 56 53 49 47 53 | 0a 23 64 65 66 69 6e 65 |e SVSIGS|.#define|
|000062f0| 20 4e 4f 53 49 47 43 4c | 44 0a 23 64 65 66 69 6e | NOSIGCL|D.#defin|
|00006300| 65 09 50 52 4f 54 45 43 | 54 5f 45 4e 56 0a 23 75 |e.PROTEC|T_ENV.#u|
|00006310| 6e 64 65 66 20 44 45 46 | 41 55 4c 54 50 41 54 48 |ndef DEF|AULTPATH|
|00006320| 0a 23 64 65 66 69 6e 65 | 20 44 45 46 41 55 4c 54 |.#define| DEFAULT|
|00006330| 50 41 54 48 20 22 2f 75 | 73 72 2f 62 73 64 22 2c |PATH "/u|sr/bsd",|
|00006340| 20 22 2f 75 73 72 2f 73 | 62 69 6e 22 2c 20 22 2f | "/usr/s|bin", "/|
|00006350| 75 73 72 2f 62 69 6e 22 | 2c 20 22 2f 62 69 6e 22 |usr/bin"|, "/bin"|
|00006360| 2c 20 22 2e 22 0a 23 65 | 6e 64 69 66 0a 0a 23 69 |, ".".#e|ndif..#i|
|00006370| 66 64 65 66 20 73 75 6e | 09 09 2f 2a 20 55 73 65 |fdef sun|../* Use|
|00006380| 64 20 6f 6e 20 53 75 6e | 4f 53 20 34 2e 31 2e 31 |d on Sun|OS 4.1.1|
|00006390| 20 2a 2f 0a 23 64 65 66 | 69 6e 65 20 50 52 4f 54 | */.#def|ine PROT|
|000063a0| 45 43 54 5f 45 4e 56 0a | 23 75 6e 64 65 66 20 44 |ECT_ENV.|#undef D|
|000063b0| 45 46 41 55 4c 54 50 41 | 54 48 0a 23 64 65 66 69 |EFAULTPA|TH.#defi|
|000063c0| 6e 65 20 44 45 46 41 55 | 4c 54 50 41 54 48 20 22 |ne DEFAU|LTPATH "|
|000063d0| 2f 75 73 72 2f 75 63 62 | 22 2c 20 22 2f 75 73 72 |/usr/ucb|", "/usr|
|000063e0| 2f 62 69 6e 22 2c 20 22 | 2e 22 0a 23 65 6e 64 69 |/bin", "|.".#endi|
|000063f0| 66 0a 0a 2f 2a 0a 20 2a | 20 53 75 67 67 65 73 74 |f../*. *| Suggest|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.